Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBlanvillain committed Jul 30, 2021
1 parent bda342d commit d52b365
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/neg/12549.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
enum Bool {
case True
case False
}

import Bool.*

type Not[B <: Bool] = B match {
case True.type => False.type
case False.type => True.type
case _ => "unreachable"
}

def foo[B <: Bool & Singleton]: Unit = {
implicitly[Not[B] =:= "unreachable"] // error

()
}

0 comments on commit d52b365

Please sign in to comment.