mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
20 lines
609 B
Mathematica
20 lines
609 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
|