aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2454.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t2454.scala')
-rw-r--r--tests/pos/t2454.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pos/t2454.scala b/tests/pos/t2454.scala
new file mode 100644
index 000000000..00f2e6f67
--- /dev/null
+++ b/tests/pos/t2454.scala
@@ -0,0 +1,25 @@
+package am;
+
+trait One[M[_]] {
+ val x : Int
+}
+
+trait Two[M[_,_]] {
+ val x : Int
+}
+
+object Test {
+ // Works.
+ val x = new Two[Map] {
+ val x = 5
+ }
+
+ val o = new One[java.util.List] {
+ val x = 1
+ }
+
+ // Does not work
+ val y = new Two[java.util.concurrent.ConcurrentHashMap] {
+ val x = 3
+ }
+}