Commit 1bf954c
committed
[CS] Better diagnose inout argument in tuple construction
Previously we relied on `TupleTypeElt::getType`
returning an `InOutType` to fail the tuple type
matching logic. Instead, add logic to reject any
inout arguments up-front with a more specific
diagnostic.
Also, while we're here, strip the `_const`
parameter flag, as it's not something that needs
to be considered for tuple construction.1 parent 227f0de commit 1bf954c
File tree
3 files changed
+42
-3
lines changed- lib/Sema
- test/Constraints
3 files changed
+42
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6983 | 6983 | | |
6984 | 6984 | | |
6985 | 6985 | | |
| 6986 | + | |
| 6987 | + | |
| 6988 | + | |
| 6989 | + | |
| 6990 | + | |
| 6991 | + | |
| 6992 | + | |
| 6993 | + | |
| 6994 | + | |
| 6995 | + | |
| 6996 | + | |
| 6997 | + | |
| 6998 | + | |
| 6999 | + | |
| 7000 | + | |
| 7001 | + | |
| 7002 | + | |
| 7003 | + | |
| 7004 | + | |
| 7005 | + | |
| 7006 | + | |
| 7007 | + | |
| 7008 | + | |
| 7009 | + | |
6986 | 7010 | | |
6987 | 7011 | | |
6988 | | - | |
6989 | | - | |
| 7012 | + | |
6990 | 7013 | | |
6991 | 7014 | | |
6992 | 7015 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5608 | 5608 | | |
5609 | 5609 | | |
5610 | 5610 | | |
| 5611 | + | |
| 5612 | + | |
| 5613 | + | |
| 5614 | + | |
| 5615 | + | |
| 5616 | + | |
| 5617 | + | |
5611 | 5618 | | |
5612 | 5619 | | |
5613 | 5620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
577 | 586 | | |
578 | 587 | | |
579 | 588 | | |
| |||
0 commit comments