Files
mercury/java/runtime
Julien Fischer 8225fdbe76 Fix a problem that prevents Java 1.7 from compiling the Java code generated by
Branches: main, 11.07

Fix a problem that prevents Java 1.7 from compiling the Java code generated by
the Mercury compiler.  Previously, the TypeInfo_Struct class in the Java
version of Mercury's runtime defined the following constructors:

    public TypeInfo_Struct(TypeInfoStruct ti, int arity, Object... as)
    public TypeInfo_Struct(TypeInfoStruct ti, Object... as)

Changes to the way most specific varargs method selection works in Java 1.7
means the above is now rejected by the Java compiler.  (It should apparently
have never been allowed in the first place.)

The fix is to delete the first constructor above from the runtime and not
generate code that provides the arity.  (The arity argument was only ever used
as a sanity check on the number of the following arguments.)

java/runtime/TypeInfo_Struct.java
	Delete one of the ambiguous constructors from this class.

compiler/rtti_to_mlds.m:
	Don't pass an arity argument to the constructor for TypeInfo_Struct
	objects.
2011-11-30 15:38:57 +00:00
..