#include "scope.h"
#include "semantics.h"
#include "symbol.h"
-#include "type.h"
#include "tools.h"
+#include "type.h"
#include "../common/Fortran.h"
#include "../common/default-kinds.h"
#include "../common/indirection.h"
ResolveDataRef(dataRef);
Walk(bounds);
// Resolve unrestricted specific intrinsic procedures as in "p => cos".
- if (const parser::Name *name{GetSimpleName(expr)}) {
+ if (const parser::Name * name{GetSimpleName(expr)}) {
if (NameIsKnownOrIntrinsic(*name)) {
return false;
}
return dynamicType.has_value() && dynamicType->category == type;
}
-void CheckScalarLogicalExpr(
- const parser::Expr &expr, parser::Messages &messages) {
- // TODO: should be asserting that typedExpr is not null
- if (expr.typedExpr == nullptr) {
- return;
- }
- if (expr.typedExpr->v.Rank() > 0) {
- messages.Say(expr.source, "Expected a scalar LOGICAL expression"_err_en_US);
- } else if (!ExprHasTypeCategory(
- *expr.typedExpr, common::TypeCategory::Logical)) {
- messages.Say(expr.source, "Expected a LOGICAL expression"_err_en_US);
- }
-}
-
static parser::Name *GetSimpleName(
common::Indirection<parser::Designator> *designator) {
if (designator) {
bool ExprHasTypeCategory(
const evaluate::GenericExprWrapper &expr, const common::TypeCategory &type);
-void CheckScalarLogicalExpr(
- const parser::Expr &expr, parser::Messages &messages);
// If this Expr or Variable represents a simple Name, return it.
parser::Name *GetSimpleName(parser::Expr &);