Files
mercury/tests/valid/bug318.m
Julien Fischer 1777c91beb Fixing failing valid tests in the Java grade.
tests/valid/bug318.m:
    Add a foreign type definition for Java.

tests/valid/semidet.disj.m:
tests/valid/solve_type_bug.m:
tests/valid/stack_alloc.m:
tests/valid/time_yaowl.m:
    Add Java stub definitions for external predicates.
    Leaving them undefined as we do in the C grades won't work.

tests/valid/Mmake.valid.common:
     Fix spelling.
2016-01-01 20:22:28 +11:00

20 lines
615 B
Mathematica

%------------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%------------------------------------------------------------------------------%
%
% Versions of the compiler before 2015 oct 29 couldn't handle having
% the foreign_type definition of mytype occurring *before* mytype's
% abstract type definition.
:- module bug318.
% :- interface.
% :- type mytype. % used to be ok
:- implementation.
:- pragma foreign_type("C", mytype, "void *").
:- pragma foreign_type("Java", mytype, "java.lang.Object").
:- interface.
:- type mytype. % used to lead to an error