-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Small Sema fixes #6406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small Sema fixes #6406
Conversation
…resolved associated types When building a generic signature, we would drop requirements where the LHS or RHS was a DependentMemberType with an unresolved associated type, however we didn't perform the same check for DependentMemberTypes that are nested inside structural types.
…etypes from context This could lead to verifier failures on invalid nesting of generic types in generic functions.
@swift-ci Please smoke test |
@@ -79,3 +79,13 @@ func takesAny(_ a: Any) {} | |||
func badDiagnostic3() { | |||
takesAny(Deli.self) // expected-error {{argument type 'Deli<_>.Type' does not conform to expected type 'Any'}} | |||
} | |||
|
|||
// Crash with missing nested type inside concrete type | |||
class OuterGeneric<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DougGregor do we have any radars for this one? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet we do... somewhere!
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
auto result = substitutions.insert( | ||
{gp->getCanonicalType()->castTo<GenericTypeParamType>(), | ||
outerEnv->mapTypeIntoContext(gp)}); | ||
genericEnv->mapTypeIntoContext(gp)}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, nice catch!
@@ -79,3 +79,13 @@ func takesAny(_ a: Any) {} | |||
func badDiagnostic3() { | |||
takesAny(Deli.self) // expected-error {{argument type 'Deli<_>.Type' does not conform to expected type 'Any'}} | |||
} | |||
|
|||
// Crash with missing nested type inside concrete type | |||
class OuterGeneric<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet we do... somewhere!
No description provided.