-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport "Remove unnecessary and recursive Space decomposition" to LTS (
- Loading branch information
Showing
8 changed files
with
80 additions
and
34 deletions.
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
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
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,16 @@ | ||
//> using options -Werror | ||
|
||
sealed trait Mark[T] | ||
|
||
trait Foo[T] | ||
class Bar1[T] extends Foo[T] | ||
class Bar2[T] extends Foo[T] with Mark[T] | ||
|
||
class Test: | ||
def t1(foo: Foo[Int]): Unit = foo match | ||
case _: Mark[t] => | ||
case _ => | ||
|
||
def t2[F <: Foo[Int]](foo: F): Unit = foo match | ||
case _: Mark[t] => | ||
case _ => |
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,15 @@ | ||
//> using options -Werror | ||
|
||
trait Outer: | ||
sealed trait Foo | ||
case class Bar1() extends Foo | ||
case class Bar2() extends Foo | ||
case object Bar3 extends Foo | ||
|
||
def foos: List[Foo] | ||
|
||
class Test: | ||
def t1(out: Outer) = out.foos.collect: | ||
case out.Bar1() => 1 | ||
case out.Bar2() => 2 | ||
case out.Bar3 => 3 |
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,9 @@ | ||
//> using options -Werror | ||
|
||
sealed trait A: | ||
class B extends A | ||
|
||
class Test: | ||
def t1(a: A): Boolean = | ||
a match | ||
case b: A#B => true |