}
parser::Messages *finalBuffer{context.messages().messages()};
// Special case: NULL()
+ // All special cases handled here before the table probes below must
+ // also be caught as special names in IsIntrinsic().
if (call.name == "null") {
parser::Messages nullBuffer;
parser::ContextualMessages nullErrors{
return begin != end && begin[0] == '.' && end[-1] == '.';
}
-bool IsInstrinsicOperator(
+bool IsIntrinsicOperator(
const SemanticsContext &context, const SourceName &name) {
std::string str{name.ToString()};
std::set<std::string> intrinsics{".and.", ".eq.", ".eqv.", ".ge.", ".gt.",
// Is this the name of a defined operator, e.g. ".foo."
bool IsDefinedOperator(const SourceName &);
-bool IsInstrinsicOperator(const SemanticsContext &, const SourceName &);
+bool IsIntrinsicOperator(const SemanticsContext &, const SourceName &);
bool IsLogicalConstant(const SemanticsContext &, const SourceName &);
// Analyze a generic-spec and generate a symbol name and GenericKind for it.
void ScopeHandler::ApplyImplicitRules(Symbol &symbol) {
if (NeedsType(symbol)) {
if (isImplicitNoneType()) {
- Say(symbol.name(), "No explicit type declared for '%s'"_err_en_US);
+ if (symbol.has<ProcEntityDetails>() &&
+ context().intrinsics().IsIntrinsic(symbol.name().ToString())) {
+ // type will be determined in expression semantics
+ } else {
+ Say(symbol.name(), "No explicit type declared for '%s'"_err_en_US);
+ }
} else if (const auto *type{GetImplicitType(symbol)}) {
symbol.SetType(*type);
}
const parser::DefinedOpName &use{std::get<1>(ops.t)};
GenericSpecInfo localInfo{local};
GenericSpecInfo useInfo{use};
- if (IsInstrinsicOperator(context(), local.v.source)) {
+ if (IsIntrinsicOperator(context(), local.v.source)) {
Say(local.v,
"Intrinsic operator '%s' may not be used as a defined operator"_err_en_US);
} else if (IsLogicalConstant(context(), local.v.source)) {