File: compilation.testsuite

package info (click to toggle)
nice 0.9.13-3.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,292 kB
  • ctags: 6,893
  • sloc: java: 42,767; xml: 3,508; lisp: 1,084; sh: 742; makefile: 670; cpp: 21; awk: 3
file content (39 lines) | stat: -rw-r--r-- 858 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
34
35
36
37
38
39
/// PASS
  /// package a
  /// Toplevel
// Two methods that have the same bytecode type
int foo(int, int->int) = 1;
int foo(int, String->int) = 2;

// Calling from the same package
void test()
{
  assert foo(0, int x => 0) == 1;
  assert foo(0, String x => 0) == 2;
}

  /// package b import a
  test();
  // Now calling from a different package
  assert foo(0, int x => 0) == 1;
  assert foo(0, String x => 0) == 2;

/// PASS
  /// package a
  /// Toplevel
// Two methods that have the same bytecode type
int foo(int, int->int) = 1;
int foo(int, String->int) = 2;

// Calling from the same package
void test()
{
  assert foo(0, int x => 0) == 1;
  assert foo(0, String x => 0) == 2;
}

  /// package b import a
  test();
  // Now calling from a different package, in the opposite order
  assert foo(0, String x => 0) == 2;
  assert foo(0, int x => 0) == 1;