mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 13:53:54 +00:00
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.
20 lines
615 B
Mathematica
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
|