Commit 3879a47
committed
[CSSyntacticElement] Remove an assert that is too strict
`return` statement withot an expression automatically gets an
implicit `()` which is allowed to be converted to types like
`()?` and `Any` or `Any?`. Let's remove a too strict assertion
that expected a contextual type to always be `()?` even
through in reality any type that `()` is convertible to is valid.
Resolves: rdar://1525531431 parent 3d6c240 commit 3879a47
File tree
3 files changed
+28
-9
lines changed- lib/Sema
- test/Constraints
- validation-test/compiler_crashers_2_fixed
3 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
2162 | | - | |
2163 | | - | |
2164 | | - | |
2165 | | - | |
2166 | | - | |
2167 | | - | |
2168 | | - | |
2169 | | - | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2170 | 2166 | | |
2171 | 2167 | | |
2172 | 2168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
0 commit comments