aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-06-06 17:44:28 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-06-06 18:43:37 +0200
commit2414bfeda301410fe64f8adddd22a24a15621850 (patch)
treed24b5fcdc0a8c2aa22b6df6548b470623c8d763b /tests/pos
parent04b0e85c70de36fd7b5a4b3ffd1b8add0963303d (diff)
downloaddotty-2414bfeda301410fe64f8adddd22a24a15621850.tar.gz
dotty-2414bfeda301410fe64f8adddd22a24a15621850.tar.bz2
dotty-2414bfeda301410fe64f8adddd22a24a15621850.zip
Fix issue with GADT not typechecking without bind in match
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i1307.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/i1307.scala b/tests/pos/i1307.scala
new file mode 100644
index 000000000..1dd922321
--- /dev/null
+++ b/tests/pos/i1307.scala
@@ -0,0 +1,7 @@
+class Term[A]
+class Number(val n: Int) extends Term[Int]
+object Test {
+ def f[B](t: Term[B]): B = t match {
+ case y: Number => y.n
+ }
+}