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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/// PASS
/// COMMENT Check that native final classes are really considered final.
/// Toplevel
<String T> T m(T);
m(String s) = "";
/// PASS
/// COMMENT Check that class is not parameterized when its parents are not.
/// Toplevel
class NBeanContextServicesListener
implements java.beans.beancontext.BeanContextServicesListener {}
/// FAIL
/// Toplevel
// java.util.Map is already retyped, with two type parameters
interface /*/// FAIL HERE */ MyMutableArray<Element> = native java.util.Map;
/// COMMENT Retype two java classes, when one refers to the other.
/// COMMENT The retyping of the second must not fail because the class was
/// COMMENT supposed to be unparameterized.
/// PASS
/// Toplevel
interface CharacterIterator<T> = native java.text.CharacterIterator;
interface CollationElementIterator<T> = native java.text.CollationElementIterator;
/// PASS
/// Toplevel
interface CollationElementIterator<T> = native java.text.CollationElementIterator;
interface CharacterIterator<T> = native java.text.CharacterIterator;
/// FAIL
/// Toplevel
class /*/// FAIL HERE */ Int = native int;
/// PASS
/// package nativePkg
/// Toplevel
class Container { Object element; }
/// package nice
Container<String> c = new Container("Allo");
/// Toplevel
// We do not import java, so Container is like a Java class.
class Container<T> = native nativePkg.Container;
<T> Container<T> newContainer(T) = native new nativePkg.Container(Object);
/// PASS
/// package a
/// Toplevel
class NonExist<T> = native NonExist;
void foo(NonExist) = native void NonExist.foo();
void isNotAMethod(String) = native void String.isNotAMethod();
void isNotAMethod(String, NonExist) = native void String.isNotAMethod(NonExist);
NonExist NonExist(long) = native new NonExist(long);
/// package b import a
{}
/// PASS bug
// retyping of constructor should not break usage of static fields/functions
String str = String.valueOf(true);
/// Toplevel
String String(char[]) = native new String(char[]);
|