Commit 6ca5ace
committed
[Distributed] Harden detecting adhoc req methods, don't crash when missing protocol decls
This issue manifested in crashing when in Xcode one would do the Archive
workflow, and we would be missing the Distributed module types and
proceed to run into a nullpointer when faced with code like this:
```
public class TestViewModel {
public init() {}
public func onReturn() {
print("on return executed!")
}
}
```
where the name matched one of the ad hoc requirements, but we'd get null
for the protocol lookup since this does not import the distributed
module.
resolves rdar://1483279361 parent a1cdd33 commit 6ca5ace
File tree
2 files changed
+101
-3
lines changed- lib/AST
- test/Distributed
2 files changed
+101
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
| |||
794 | 796 | | |
795 | 797 | | |
796 | 798 | | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
797 | 802 | | |
798 | 803 | | |
799 | 804 | | |
| |||
925 | 930 | | |
926 | 931 | | |
927 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
928 | 936 | | |
929 | 937 | | |
930 | 938 | | |
| |||
1051 | 1059 | | |
1052 | 1060 | | |
1053 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1054 | 1065 | | |
1055 | 1066 | | |
1056 | 1067 | | |
| |||
1158 | 1169 | | |
1159 | 1170 | | |
1160 | 1171 | | |
1161 | | - | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1162 | 1175 | | |
1163 | 1176 | | |
1164 | 1177 | | |
| |||
1251 | 1264 | | |
1252 | 1265 | | |
1253 | 1266 | | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1254 | 1270 | | |
1255 | 1271 | | |
1256 | 1272 | | |
| |||
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
0 commit comments