Commit fefde3b
committed
Sema: Fix crash with property override and almost-valid superclass
It's possible that getSuperclassDecl() returns something but
getSuperclass() does not, for example if you reference a generic
superclass with missing or invalid generic arguments. We would
crash in that case when going down this particular code path.
However, the call to getSuperclass() and the entire function it
appeared in was actually unnecessary.
Fixes #74651
Fixes rdar://problem/1303949431 parent ca0afe2 commit fefde3b
File tree
2 files changed
+11
-15
lines changed- lib/Sema
- test/decl/class
2 files changed
+11
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | 860 | | |
874 | 861 | | |
875 | 862 | | |
| |||
1283 | 1270 | | |
1284 | 1271 | | |
1285 | 1272 | | |
1286 | | - | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1287 | 1276 | | |
1288 | 1277 | | |
1289 | 1278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
0 commit comments