You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse: Support parsing subclass existentials involving generic classes in expression context
Generic type specialization is ambiguous with < and > operators.
Extend the disambiguation hack to also consider parsing a generic
parameter list if the > is followed by &.
This fixes parsing types such as 'Base<Int> & P' in expression
context.
Copy file name to clipboardExpand all lines: test/type/subclass_composition.swift
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -531,3 +531,10 @@ func staticMembers(
531
531
_ = m2.instanceProtocolMember // expected-error {{instance member 'instanceProtocolMember' cannot be used on type 'ClassWithStaticMember & ProtocolWithStaticMember'}}
532
532
_ = m2.instanceClassMember // expected-error {{instance member 'instanceClassMember' cannot be used on type 'ClassWithStaticMember & ProtocolWithStaticMember'}}
533
533
}
534
+
535
+
// Make sure we correctly form subclass existentials in expression context.
0 commit comments