diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-05-20 14:05:17 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-05-20 14:05:17 +0000 |
commit | 293b70525e5d22e64af51d99aea6714b197aa052 (patch) | |
tree | c74f94771aaf4edda90ce8da227cdbb7d98984a8 /test/files/run | |
parent | 4debc5bf1e89a8cb185fd7af1adf1c81c0e95e0c (diff) | |
download | scala-293b70525e5d22e64af51d99aea6714b197aa052.tar.gz scala-293b70525e5d22e64af51d99aea6714b197aa052.tar.bz2 scala-293b70525e5d22e64af51d99aea6714b197aa052.zip |
Closed #3432.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/spec-ame.check | 2 | ||||
-rw-r--r-- | test/files/run/spec-ame.scala | 17 |
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) + } +} |