Enum shorthands using a type alias and invoking a constructor #4183
Labels
brevity
A feature whose purpose is to enable concise syntax, typically expressible already in a longer form
enum-shorthands
Issues related to the enum shorthands feature.
question
Further information is requested
Consider the following program, which assumes https://github.com/dart-lang/language/blob/main/working/3616%20-%20enum%20value%20shorthand/proposal-simple-lrhn.md:
The meaning of
.new('Hello!').aInt
isAIntAlias.new('Hello!').aInt
, which is a compile-time error.I think we would want to add a few words to the spec saying that the context type is subjected to a full alias expansion before we attempt to strip off the actual type arguments and re-compute them by inference.
@dart-lang/language-team, do you see any reason not to do this?
The text was updated successfully, but these errors were encountered: