From d7739fc01492e674a2806e08558a8112a885ee1b Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 23 Sep 2010 15:51:19 +0000 Subject: closes #3857: retain pre-erasure info in type h... closes #3857: retain pre-erasure info in type history after cloning of mixed in members and, specifically for this bug, fields, so that java generic type sigs are more precise. review by DRagos --- test/files/run/t3857.check | 2 ++ test/files/run/t3857.scala | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/files/run/t3857.check create mode 100644 test/files/run/t3857.scala (limited to 'test/files') diff --git a/test/files/run/t3857.check b/test/files/run/t3857.check new file mode 100644 index 0000000000..11c05783d9 --- /dev/null +++ b/test/files/run/t3857.check @@ -0,0 +1,2 @@ +private java.util.Set ScalaGeneric.s +private java.util.Set ScalaGeneric2.s \ No newline at end of file diff --git a/test/files/run/t3857.scala b/test/files/run/t3857.scala new file mode 100644 index 0000000000..9cb44e7fe7 --- /dev/null +++ b/test/files/run/t3857.scala @@ -0,0 +1,12 @@ +class ScalaGeneric { var s: java.util.Set[String] = _ } + +trait ScalaGeneric2Trait { var s: java.util.Set[String] = _ } +class ScalaGeneric2 extends ScalaGeneric2Trait + +object Test extends Application { + println(classOf[ScalaGeneric].getDeclaredField("s").toGenericString) + // java.util.Set ScalaGeneric.s + + println(classOf[ScalaGeneric2].getDeclaredField("s").toGenericString) + // java.util.Set ScalaGeneric2.s -- should be same as above +} \ No newline at end of file -- cgit v1.2.3