Commit 9671bc4
committed
Fix #7820: Break cycle when computing completerTypeParams
The following no longer crashes:
class C { type F[X <: F[_, _], Y] }
But it is still flagged as a cyclic reference error, whereas nsc accepts it. I believe it would be
tricky/risky to change dotc's algorithms to accept it as well, and I am not sure it's
necessary. Generally, we want to get away from F-bounds, so just accepting the most
common use case (F-bounds in method type parameters) is hopefully OK.1 parent d45fea0 commit 9671bc4
File tree
2 files changed
+21
-19
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/neg
2 files changed
+21
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
947 | | - | |
948 | | - | |
| 947 | + | |
| 948 | + | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
967 | 966 | | |
968 | | - | |
| 967 | + | |
969 | 968 | | |
970 | 969 | | |
971 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments