Commit 3f8e4e7
committed
AST: Fix mistake with generic signature in findExistentialSelfReferences()
We used to concatenate the DeclContext's generic signature with the
protocol requirement's signature, then look for occurrences of the
first generic parameter from the DeclContext's signature in the
requirement's type.
This almost worked, except when the first generic parameter from the
DeclContext's signature didn't conform to a protocol referenced by
an associated type. In that case, we would falsely report that there
are no 'Self' references.
Note that the CHECK lines in test/SILGen/witnesses_class.swift change
to what they were before 01d9d61.1 parent bc6a38c commit 3f8e4e7
File tree
6 files changed
+17
-15
lines changed- include/swift/AST
- lib
- AST
- Sema
- test/SILGen
6 files changed
+17
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2693 | 2693 | | |
2694 | 2694 | | |
2695 | 2695 | | |
2696 | | - | |
2697 | | - | |
| 2696 | + | |
2698 | 2697 | | |
2699 | 2698 | | |
2700 | 2699 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4085 | 4085 | | |
4086 | 4086 | | |
4087 | 4087 | | |
4088 | | - | |
4089 | | - | |
| 4088 | + | |
4090 | 4089 | | |
| 4090 | + | |
4091 | 4091 | | |
4092 | 4092 | | |
4093 | 4093 | | |
| |||
4099 | 4099 | | |
4100 | 4100 | | |
4101 | 4101 | | |
4102 | | - | |
4103 | | - | |
4104 | | - | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
| 4107 | + | |
4105 | 4108 | | |
4106 | 4109 | | |
4107 | 4110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6107 | 6107 | | |
6108 | 6108 | | |
6109 | 6109 | | |
6110 | | - | |
| 6110 | + | |
6111 | 6111 | | |
6112 | 6112 | | |
6113 | 6113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
| 684 | + | |
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | | - | |
| 1046 | + | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | 1049 | | |
| |||
4065 | 4065 | | |
4066 | 4066 | | |
4067 | 4067 | | |
4068 | | - | |
| 4068 | + | |
4069 | 4069 | | |
4070 | 4070 | | |
4071 | 4071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments