-
Notifications
You must be signed in to change notification settings - Fork 228
Closed
Labels
brevityA feature whose purpose is to enable concise syntax, typically expressible already in a longer formA feature whose purpose is to enable concise syntax, typically expressible already in a longer formdot-shorthandsIssues related to the dot shorthands feature.Issues related to the dot shorthands feature.questionFurther information is requestedFurther information is requested
Description
Consider the following program, which assumes https://github.com/dart-lang/language/blob/main/working/3616%20-%20enum%20value%20shorthand/proposal-simple-lrhn.md:
class A<X> {
final X x;
A(this.x);
AIntAlias get aInt => A(25);
}
typedef AIntAlias = A<int>;
void main() {
AIntAlias _ = .new('Hello!').aInt;
}The meaning of .new('Hello!').aInt is AIntAlias.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?
tenhobi and albertms10
Metadata
Metadata
Assignees
Labels
brevityA feature whose purpose is to enable concise syntax, typically expressible already in a longer formA feature whose purpose is to enable concise syntax, typically expressible already in a longer formdot-shorthandsIssues related to the dot shorthands feature.Issues related to the dot shorthands feature.questionFurther information is requestedFurther information is requested