diff options
author | Ben Hutchison <brhutchison@gmail.com> | 2016-05-19 17:01:45 +1000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-05-19 09:01:45 +0200 |
commit | 15189d14953335f7a3a8310861d045d21ab22d48 (patch) | |
tree | e02b64894cda16361205779c95039d79fa2d6697 /test/files/pos/t7088.scala | |
parent | 960e4d76a382ff009c66346289db10b2ee598aa5 (diff) | |
download | scala-15189d14953335f7a3a8310861d045d21ab22d48.tar.gz scala-15189d14953335f7a3a8310861d045d21ab22d48.tar.bz2 scala-15189d14953335f7a3a8310861d045d21ab22d48.zip |
Test case for SI-5183, tagged primitives in case classes (#5144)
Test for SI-7088, arrays containing tagged primitives
Diffstat (limited to 'test/files/pos/t7088.scala')
-rw-r--r-- | test/files/pos/t7088.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/t7088.scala b/test/files/pos/t7088.scala new file mode 100644 index 0000000000..de9d1b7040 --- /dev/null +++ b/test/files/pos/t7088.scala @@ -0,0 +1,8 @@ +object Example extends App { + type Tag[X] = {type Tag = X} + type TaggedArray[T] = Array[T] with Tag[Any] + + def method[T: reflect.ClassTag](a: TaggedArray[T], value: T) {a.update(0, value)} + + method(Array(1, 2).asInstanceOf[TaggedArray[Int]], 1) +} |