Commit 7ea0d97
committed
Make simplify replace type parameters inside method types
Simplify usually replaces a constrained TypeParamRef with the associated TypeVar, which is
necessary so that the TypeParamRef is properly instantiated afterwards. But it did not
recurse inside method types, since that might change signatures.
This commit adds an auxiliary TypeMap over method types that just instantiates
TypeParamRefs without applying any of the other transformations of simplify.1 parent 267a7e4 commit 7ea0d97
File tree
3 files changed
+20
-2
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
3 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1890 | 1890 | | |
1891 | 1891 | | |
1892 | 1892 | | |
1893 | | - | |
| 1893 | + | |
| 1894 | + | |
1894 | 1895 | | |
1895 | 1896 | | |
1896 | 1897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments