File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3037,6 +3037,9 @@ namespace {
3037
3037
typeContext->getDeclaredInterfaceType ());
3038
3038
auto superclassTy = selfTy->getSuperclass ();
3039
3039
3040
+ if (!superclassTy)
3041
+ return Type ();
3042
+
3040
3043
if (selfDecl->getInterfaceType ()->is <MetatypeType>())
3041
3044
superclassTy = MetatypeType::get (superclassTy);
3042
3045
Original file line number Diff line number Diff line change @@ -59,3 +59,12 @@ func use_d(_ d: D) -> Int {
59
59
func not_method( ) {
60
60
super. foo ( ) // expected-error{{'super' cannot be used outside of class members}}
61
61
}
62
+
63
+ // rdar://problem/50819554 - inability to properly resolve superclass shouldn't crash the solver
64
+ func test_that_invalid_supertype_ref_doesnt_crash( ) {
65
+ final class Node : ManagedBuffer < AnyObject , Undefined > { // expected-error {{cannot find type 'Undefined' in scope}}
66
+ static func create( ) {
67
+ super. create ( )
68
+ }
69
+ }
70
+ }
You can’t perform that action at this time.
0 commit comments