messageDisplayedSet_ |= 8;
}
return;
+ } else if (dyType->category() == TypeCategory::Derived &&
+ dyType->GetDerivedTypeSpec().typeSymbol().attrs().test(
+ semantics::Attr::ABSTRACT)) { // F'2023 C7125
+ if (!(messageDisplayedSet_ & 0x200)) {
+ exprAnalyzer_.Say(
+ "An item whose declared type is ABSTRACT may not appear in an array constructor"_err_en_US);
+ messageDisplayedSet_ |= 0x200;
+ }
}
DynamicTypeWithLength xType{dyType.value()};
if (Expr<SomeCharacter> * charExpr{UnwrapExpr<Expr<SomeCharacter>>(*x)}) {
!ERROR: Cannot have an unlimited polymorphic value in an array constructor
intarray = (/ unlim_polymorphic, 2, 3, 4, 5/)
- ! C7114
+ ! C7114, F'2023 C7125
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types INTEGER(4) and TYPE(base_type)
!ERROR: ABSTRACT derived type 'base_type' may not be used in a structure constructor
+ !ERROR: An item whose declared type is ABSTRACT may not appear in an array constructor
!ERROR: Values in array constructor must have the same declared type when no explicit type appears
intarray = (/ base_type(10), 2, 3, 4, 5 /)