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 @@ -2954,6 +2954,9 @@ namespace {
2954
2954
typeContext->getDeclaredInterfaceType ());
2955
2955
auto superclassTy = selfTy->getSuperclass ();
2956
2956
2957
+ if (!superclassTy)
2958
+ return Type ();
2959
+
2957
2960
if (selfDecl->getInterfaceType ()->is <MetatypeType>())
2958
2961
superclassTy = MetatypeType::get (superclassTy);
2959
2962
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