File: main.nice

package info (click to toggle)
nice 0.9.12-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,220 kB
  • ctags: 6,894
  • sloc: java: 42,767; xml: 3,508; lisp: 1,079; sh: 736; makefile: 673; cpp: 21; awk: 3
file content (33 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (4)
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
package regtest.multipkg;

import regtest.multipkg.a;
import regtest.multipkg.b;

// Test multiple imports of the same package and self-import
import regtest.multipkg;
import regtest.multipkg.a;
import regtest.multipkg.b;

import java.util.*;

class AA extends regtest.multipkg.a.A {}
class BB extends B {}

void main(String[] args)
{
  println(f(new regtest.multipkg.a.A()) + " " + 
	  f(new B()) + " " + 
	  f(new AA()) + " " + 
	  f(new BB()));

  // Tests constructors call with discarded result
  // and access to symbols both with full qualified names and imported names.
  // The order was significant in a bug (false ambiguity).
  let aa1 = new regtest.multipkg.AA();
  let aa2 = new AA();

  let TreeSet<String> ts1 = new java.util.TreeSet();
  let TreeSet<String> ts2 = new TreeSet();

  test_import();
}