aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2016-06-22 15:35:25 +0200
committerGitHub <noreply@github.com>2016-06-22 15:35:25 +0200
commit914d465aa13cf90fab71dbdf5ab314f9be191891 (patch)
treeb7da6bca6cae5a6094b317842076011166ab557d /tests/pos
parentaf93e8821f7885819e04f3dfd6ab798e600d68cf (diff)
parent2b3c5c60cea83b3add2774bbfa840aa91312cb01 (diff)
downloaddotty-914d465aa13cf90fab71dbdf5ab314f9be191891.tar.gz
dotty-914d465aa13cf90fab71dbdf5ab314f9be191891.tar.bz2
dotty-914d465aa13cf90fab71dbdf5ab314f9be191891.zip
Merge pull request #1309 from felixmulder/topic/fix#1307
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
+ }
+}