diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/pending/script | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/pending/script')
-rw-r--r-- | test/pending/script/t2365/Test.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/pending/script/t2365/Test.scala b/test/pending/script/t2365/Test.scala index 53581d256b..110dea2ab6 100644 --- a/test/pending/script/t2365/Test.scala +++ b/test/pending/script/t2365/Test.scala @@ -17,17 +17,17 @@ object Test for(i <- 0 until 150) println(i + " " + test(A.apply) + " " + test(A2.apply) + " " + test(A3.apply) + " " + test(A3.apply)) } - + def test(withF0: StructF0 => Int): Int = { // Some large jar val jar = File("../../../../lib/scalacheck.jar").toURL // load a class in a separate loader that will be passed to A val loader = new java.net.URLClassLoader(Array(File(".").toURL, jar)) // load a real class to fill perm gen space - Class.forName("org.scalacheck.Properties", true, loader).newInstance + Class.forName("org.scalacheck.Properties", true, loader).newInstance // create a class from another class loader with an apply: Int method val b = Class.forName("B", true, loader).newInstance - + // pass instance to a, which will call apply using structural type reflection. // This should hold on to the class for B, which means bLoader will not get collected withF0(b.asInstanceOf[StructF0]) |