Commit 3369e33
committed
[Typed throws] Handle explicitly-specified
Teach the constraint system to use the same primitives as elsewhere to
determine the type context for a `throw` statement and the caught
error type within a `do..catch` statement. This makes
explicitly-specified `throws` work on `do..catch` that occurs in
closures.
Cleans up some redundant computations for caught error types.throws on do..catch in closures1 parent 91df336 commit 3369e33
File tree
4 files changed
+44
-41
lines changed- include/swift/AST
- lib
- AST
- Sema
- test/stmt
4 files changed
+44
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 127 | | |
146 | 128 | | |
147 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11702 | 11702 | | |
11703 | 11703 | | |
11704 | 11704 | | |
11705 | | - | |
11706 | | - | |
11707 | | - | |
| 11705 | + | |
| 11706 | + | |
| 11707 | + | |
| 11708 | + | |
| 11709 | + | |
| 11710 | + | |
| 11711 | + | |
| 11712 | + | |
| 11713 | + | |
| 11714 | + | |
| 11715 | + | |
| 11716 | + | |
11708 | 11717 | | |
11709 | | - | |
11710 | 11718 | | |
11711 | 11719 | | |
11712 | 11720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
922 | 930 | | |
923 | | - | |
924 | | - | |
925 | | - | |
| 931 | + | |
926 | 932 | | |
927 | 933 | | |
928 | 934 | | |
929 | 935 | | |
930 | 936 | | |
931 | | - | |
| 937 | + | |
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
| |||
937 | 943 | | |
938 | 944 | | |
939 | 945 | | |
940 | | - | |
| 946 | + | |
941 | 947 | | |
942 | 948 | | |
943 | 949 | | |
| |||
1053 | 1059 | | |
1054 | 1060 | | |
1055 | 1061 | | |
1056 | | - | |
1057 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1058 | 1068 | | |
1059 | 1069 | | |
1060 | 1070 | | |
| |||
1332 | 1342 | | |
1333 | 1343 | | |
1334 | 1344 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | 1345 | | |
1348 | 1346 | | |
1349 | 1347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
0 commit comments