[flang-commits] [flang] [flang][semantics] make sure dynamic type inquiry functions take extensible or unlimited polymorphic types (PR #162931)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Wed Oct 15 10:51:24 PDT 2025
================
@@ -2103,9 +2105,18 @@ std::optional<SpecificCall> IntrinsicInterface::Match(
}
return std::nullopt;
} else if (!d.typePattern.categorySet.test(type->category())) {
+ std::string expectedText;
----------------
klausler wrote:
This is way more complicated than it needs to be.
```
const char *expected{d.typePattern.kindCode == KindCode::extensibleOrUnlimitedType) ? ", expected extensible or unlimited polymorphic type" : ""};
messages.Say(arg->sourceLocation(), "Actual argument for '%s=' has bad type '%s'%s"_err_en_US, d.keyword, type->AsFortran());
```
https://github.com/llvm/llvm-project/pull/162931
More information about the flang-commits
mailing list