-
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.
Adapt specification to handle narrowed GADT bounds
- Loading branch information
1 parent
70e8e1e
commit 3dbb2fa
Showing
2 changed files
with
32 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sealed trait Exp[T] | ||
case class Fun[A, B](f: Exp[A => B]) extends Exp[A => B] | ||
|
||
class Test { | ||
def eval[T](e: Exp[T]) = e match { | ||
case Fun(x: Fun[Int, Double]) => ??? // error | ||
case Fun(x: Exp[Int => String]) => ??? // error | ||
} | ||
} |