Commit 185a7d5
committed
[CS] Fix locator for
Currently we don't insert an intermediate
`SyntacticElement` locator element for the `if`
statement in a SingleValueStmtExpr, which leads
to an assertion failure when attempting to simplify
a following `TernaryBranch` element.
Move the insertion of the `SyntacticElement` locator
element for the statement into the
SingleValueStmtExpr constraint generation function,
and remove it from the statement visitors themselves.
For the other cases, the `SyntacticElement` was
already being inserted for children of a BraceStmt,
so we were actually previously ending up with
duplicated elements in a couple of places.if expressions1 parent bc8efec commit 185a7d5
File tree
2 files changed
+29
-13
lines changed- lib/Sema
- test/Constraints
2 files changed
+29
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | 1002 | | |
1006 | 1003 | | |
1007 | 1004 | | |
1008 | 1005 | | |
1009 | | - | |
| 1006 | + | |
1010 | 1007 | | |
1011 | 1008 | | |
1012 | 1009 | | |
| |||
1016 | 1013 | | |
1017 | 1014 | | |
1018 | 1015 | | |
1019 | | - | |
| 1016 | + | |
1020 | 1017 | | |
1021 | 1018 | | |
1022 | | - | |
| 1019 | + | |
1023 | 1020 | | |
1024 | 1021 | | |
1025 | 1022 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | 1023 | | |
1030 | 1024 | | |
1031 | 1025 | | |
1032 | 1026 | | |
1033 | 1027 | | |
1034 | 1028 | | |
1035 | 1029 | | |
1036 | | - | |
| 1030 | + | |
1037 | 1031 | | |
1038 | 1032 | | |
1039 | 1033 | | |
1040 | 1034 | | |
1041 | 1035 | | |
1042 | | - | |
| 1036 | + | |
1043 | 1037 | | |
1044 | | - | |
| 1038 | + | |
1045 | 1039 | | |
1046 | 1040 | | |
1047 | 1041 | | |
| |||
1556 | 1550 | | |
1557 | 1551 | | |
1558 | 1552 | | |
1559 | | - | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
1560 | 1556 | | |
1561 | 1557 | | |
1562 | 1558 | | |
| |||
| 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 | + | |
0 commit comments