summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/spec-ame.check2
-rw-r--r--test/files/run/spec-ame.scala17
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/spec-ame.check b/test/files/run/spec-ame.check
new file mode 100644
index 0000000000..afa12db4df
--- /dev/null
+++ b/test/files/run/spec-ame.check
@@ -0,0 +1,2 @@
+abc
+10
diff --git a/test/files/run/spec-ame.scala b/test/files/run/spec-ame.scala
new file mode 100644
index 0000000000..86c47077f0
--- /dev/null
+++ b/test/files/run/spec-ame.scala
@@ -0,0 +1,17 @@
+// ticket #3432
+object Test {
+ trait B[@specialized(Int) T] {
+ def value: T
+ }
+
+ class A[@specialized(Int) T](x: T) {
+ def foo: B[T] = new B[T] {
+ def value = x
+ }
+ }
+
+ def main(args: Array[String]) {
+ println((new A("abc")).foo.value)
+ println((new A(10)).foo.value)
+ }
+}