blob: 04a72fa2226b537126cbb1a890688c0c983d1092 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//############################################################################
// Compile Time Errors
//############################################################################
// $Id$
import java.lang.System; // to avoid name clash with .NET's library
//############################################################################
// Test 0 - Block Qualifiers
package test0.bar {
object System {
val out: PrintStream = new PrintStream();
}
class PrintStream() {
def println(): Unit = {
java.lang.System.out.println();
}
}
}
object Test0Test {
def main(args: Array[String]): Unit = {
{System.out.print(10)}; java.lang.System.out.println();
{System.out.print(11); java}.lang.System.out.println();
{System.out.print(12); java.lang}.System.out.println();
{System.out.print(13); java.lang.System}.out.println();
{System.out.print(14); java.lang.System.out}.println();
{System.out.print(15); java.lang.System.out.println:(() => Unit)}();
{System.out.print(16); java.lang.System.out.println()};
{System.out.print(20)}; test0.bar.System.out.println();
{System.out.print(21); test0}.bar.System.out.println();
{System.out.print(22); test0.bar}.System.out.println();
{System.out.print(23); test0.bar.System}.out.println();
{System.out.print(24); test0.bar.System.out}.println();
{System.out.print(25); test0.bar.System.out.println:(() => Unit)}();
{System.out.print(26); test0.bar.System.out.println()};
}
}
//############################################################################
|