forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scala#8647: Remove TypeParamRef from instantiated test
- Loading branch information
1 parent
a6b47e4
commit 2a7296e
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
final class Two[A, B]() | ||
|
||
final class Blaaa | ||
|
||
final class Bla[X] | ||
|
||
object Test1 { | ||
|
||
type Foo[X] = X match | ||
case Two[Blaaa, _] => | ||
String | ||
case Two[String, _] => | ||
Int | ||
|
||
def test: Foo[Two[String, String]] = 1 | ||
} | ||
|
||
object Test2 { | ||
type Foo[X] = X match | ||
case Two[Bla[_], _] => | ||
String | ||
case Two[String, _] => | ||
Int | ||
|
||
def test: Foo[Two[String, String]] = 1 | ||
} | ||
|
||
|
||
object Test3 { | ||
type Id[W] = W | ||
|
||
type M[X, Y] = X match { | ||
case Int => String | ||
case Id[x] => Y match { | ||
case Two[Bla[a], _] => Int | ||
case _ => String | ||
} | ||
} | ||
val x: M[Boolean, Two[Boolean, Boolean]] = "" | ||
} | ||
|
||
object Test4 { | ||
type Id[W] = W | ||
|
||
type M[X, Y] = X match { | ||
case Int => String | ||
case Id[x] => Y match { | ||
case Two[Bla[`x`], _] => Int | ||
case _ => String | ||
} | ||
} | ||
val x: M[Boolean, Two[Bla[Boolean], Boolean]] = 1 | ||
} |