diff options
Diffstat (limited to 'test/files/pos/t2454.scala')
-rw-r--r-- | test/files/pos/t2454.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/pos/t2454.scala b/test/files/pos/t2454.scala new file mode 100644 index 0000000000..00f2e6f677 --- /dev/null +++ b/test/files/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 + } +} |