diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2006-11-02 11:10:44 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2006-11-02 11:10:44 +0000 |
commit | 6b142c2217096e262e52c06753ad520a2eab054a (patch) | |
tree | 308826add4e368413ba8f96a5796831839110c92 /test | |
parent | d9ba6d6db90bcf0bbb34e706bcad8e2c316bce8f (diff) | |
download | scala-6b142c2217096e262e52c06753ad520a2eab054a.tar.gz scala-6b142c2217096e262e52c06753ad520a2eab054a.tar.bz2 scala-6b142c2217096e262e52c06753ad520a2eab054a.zip |
Added a value for Java static inner classes to ...
Added a value for Java static inner classes to allow access to static
members.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/lib/nest.jar.desired.sha1 | 1 | ||||
-rw-r--r-- | test/files/jvm/nest.check | 3 | ||||
-rw-r--r-- | test/files/jvm/nest.java | 17 | ||||
-rw-r--r-- | test/files/jvm/nest.scala | 17 |
4 files changed, 38 insertions, 0 deletions
diff --git a/test/files/jvm/lib/nest.jar.desired.sha1 b/test/files/jvm/lib/nest.jar.desired.sha1 new file mode 100644 index 0000000000..b9b4065db6 --- /dev/null +++ b/test/files/jvm/lib/nest.jar.desired.sha1 @@ -0,0 +1 @@ +4141e6f277e97f81079f81910a7b2b4d6c0127b7 ?nest.jar diff --git a/test/files/jvm/nest.check b/test/files/jvm/nest.check new file mode 100644 index 0000000000..445369969e --- /dev/null +++ b/test/files/jvm/nest.check @@ -0,0 +1,3 @@ +2 +3 +10 diff --git a/test/files/jvm/nest.java b/test/files/jvm/nest.java new file mode 100644 index 0000000000..dfb011732c --- /dev/null +++ b/test/files/jvm/nest.java @@ -0,0 +1,17 @@ +package a; + + +/** This file is needed for test 'nest.scala'. It should + * be compiled with javac and packaged into lib/nest.jar + */ +public class nest { + public static class best { + public static class rest { + public static rest test = new rest(); + public static int x = 10; + public int inc(int i) { + return i + 1; + } + } + } +} diff --git a/test/files/jvm/nest.scala b/test/files/jvm/nest.scala new file mode 100644 index 0000000000..ebd3ee490a --- /dev/null +++ b/test/files/jvm/nest.scala @@ -0,0 +1,17 @@ +//############################################################################ +// Test Scala interaction with Java nested classes and static members. +//############################################################################ +// $Id: inner.scala 8902 2006-10-10 10:58:10 +0200 (Tue, 10 Oct 2006) mihaylov $ + +/** found in nest.jar, compiled from nest.java */ +import a._; + +object Test extends Application { + val x = nest.best.rest.test + Console.println(x.inc(1)) + + val o = new nest.best; + val r = new nest.best.rest; + Console.println(nest.best.rest.test.inc(2)) + Console.println(nest.best.rest.x) +} |