Function type alias (typedef) is not a constant #11592
Labels
area-test
Cross-cutting test issues (use area- labels for specific failures; not used for package:test).
closed-obsolete
Closed as the reported issue is no longer relevant
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
language/first_class_types_constants_test
12.1 Constants
* An identier expression that denotes a constant variable or a class.
15.3.1 Typedef
The e�ect of a type alias of the form typedef T id(T1 p1; : : : ; Tn pn;[Tn+1
pn+1; : : : ; Tn+k pn+k]) declared in a library L is is to introduce the name id into
the scope of L, bound to the function type (T1; : : : ; Tn;[Tn+1 pn+1; : : : ; Tn+k
pn+k]) ! T. The e�ect of a type alias of the form typedef T id(T1 p1; : : : ; Tn
pn;fTn+1 pn+1; : : : ; Tn+k pn+kg) declared in a library L is is to introduce the
name id into the scope of L, bound to the function type (T1; : : : ; Tn;fTn+1
pn+1; : : : ; Tn+k pn+kg) ! T.
As I can see, typedef (form for type alias) does not declare class.
So, it is not a constant.
The text was updated successfully, but these errors were encountered: