}
// Collect the symbols of this scope sorted by their original order, not name.
-// Namelists are an exception: they are sorted to the end.
+// Namelists are an exception: they are sorted after other symbols.
std::vector<const Symbol *> CollectSymbols(const Scope &scope) {
std::set<const Symbol *> symbols; // to prevent duplicates
std::vector<const Symbol *> sorted;
void DeclarationVisitor::CheckScalarIntegerType(const parser::Name &name) {
if (name.symbol != nullptr) {
const Symbol &symbol{*name.symbol};
- if (symbol.IsArray()) {
+ if (symbol.IsObjectArray()) {
Say(name, "Variable '%s' is not scalar"_err_en_US);
return;
}
if (auto *type{prev->GetType()}) {
symbol.SetType(*type);
}
- if (prev->IsArray()) {
+ if (prev->IsObjectArray()) {
SayWithDecl(name, *prev, "Index variable '%s' is not scalar"_err_en_US);
return;
}
details_);
}
-bool Symbol::IsArray() const {
+bool Symbol::IsObjectArray() const {
const auto *details{std::get_if<ObjectEntityDetails>(&details_)};
return details && details->IsArray();
}
void SetType(const DeclTypeSpec &);
- bool IsArray() const;
+ bool IsObjectArray() const;
bool IsSubprogram() const;
bool IsSeparateModuleProc() const;
bool HasExplicitInterface() const {