aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/templateParents.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/templateParents.scala b/tests/pos/templateParents.scala
new file mode 100644
index 000000000..530f8c148
--- /dev/null
+++ b/tests/pos/templateParents.scala
@@ -0,0 +1,12 @@
+object templateParents {
+
+// traits do not call a constructor
+ class C[+T](x: T)
+ trait D extends C[String]
+ trait E extends C[Int]
+ new C("abc") with D
+
+ //val x = new D with E
+
+ //val y: C = x
+} \ No newline at end of file