aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i2151.scala6
-rw-r--r--tests/run/caseClassHash.check8
-rw-r--r--tests/run/t4400.scala35
3 files changed, 45 insertions, 4 deletions
diff --git a/tests/neg/i2151.scala b/tests/neg/i2151.scala
new file mode 100644
index 000000000..1ae034c02
--- /dev/null
+++ b/tests/neg/i2151.scala
@@ -0,0 +1,6 @@
+trait Test {
+ type Nil = [K] => K
+ type StrangeCons[H, Tail <: [H, A] => H] = Tail[H, H]
+
+ def list: StrangeCons[Int, Nil] // error
+}
diff --git a/tests/run/caseClassHash.check b/tests/run/caseClassHash.check
index b5a6f08e9..332fd477d 100644
--- a/tests/run/caseClassHash.check
+++ b/tests/run/caseClassHash.check
@@ -1,9 +1,9 @@
Foo(true,-1,-1,d,-5,-10,500.0,500.0,List(),5.0)
Foo(true,-1,-1,d,-5,-10,500.0,500.0,List(),5)
-1383698062
-1383698062
+205963949
+205963949
true
-## method 1: 1383698062
-## method 2: 1383698062
+## method 1: 205963949
+## method 2: 205963949
Murmur 1: 1383698062
Murmur 2: 1383698062
diff --git a/tests/run/t4400.scala b/tests/run/t4400.scala
new file mode 100644
index 000000000..04ae6722e
--- /dev/null
+++ b/tests/run/t4400.scala
@@ -0,0 +1,35 @@
+final class Outer {
+
+
+
+ sealed trait Inner
+
+
+
+ final case class Inner1(foo: Int) extends Inner
+
+
+
+ val inner: Outer#Inner = Inner1(0)
+
+
+
+ def bar = inner match {
+
+ case Inner1(i) => i
+
+ }
+
+}
+
+
+
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ val s = (new Outer).bar
+ assert(s == 0)
+ }
+
+}
+