diff options
author | Martin Odersky <odersky@gmail.com> | 2013-04-05 12:15:45 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-04-05 12:15:45 +0200 |
commit | f8d5c8401ab7e4a31c9f4430ad64e27d8cb08bac (patch) | |
tree | 64d0916d98f35a63da221bbdf95d44bc4467e759 /test/test/nesting.sc | |
parent | 2dcae86ae6937ad2f8cd8b05734eb9feb964404e (diff) | |
download | dotty-f8d5c8401ab7e4a31c9f4430ad64e27d8cb08bac.tar.gz dotty-f8d5c8401ab7e4a31c9f4430ad64e27d8cb08bac.tar.bz2 dotty-f8d5c8401ab7e4a31c9f4430ad64e27d8cb08bac.zip |
Refactored test framework
Moves worksheets to test. Factored out class DottyTest and made it usable from worksheets. Added worksheet test for signatures.
Diffstat (limited to 'test/test/nesting.sc')
-rw-r--r-- | test/test/nesting.sc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/test/nesting.sc b/test/test/nesting.sc new file mode 100644 index 000000000..a6fc92432 --- /dev/null +++ b/test/test/nesting.sc @@ -0,0 +1,31 @@ +package dotty.tools.dotc.core + +object nesting { + class C { + + class D { + private def x = "D" + def show = x + class E { + println(x) + } + } + + val foo: D = { + class D extends C.this.D { + private def x = "foo.D" + class E { + println(x) + } + } + new D + } + } + + val c = new C //> c : dotty.tools.dotc.core.nesting.C = dotty.tools.dotc.core.nesting$C@1a84d + //| a23 + val d = c.foo //> d : dotty.tools.dotc.core.nesting.c.D = dotty.tools.dotc.core.nesting$C$D$1 + //| @2705d88a + d.show //> res0: String = foo.D + +}
\ No newline at end of file |