This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/errors/warnings.lgt
pmoura d79dd807e6 Logtalk 2.29.1 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1744 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2006-12-28 13:03:34 +00:00

75 lines
1.0 KiB
Plaintext

:- object(misspell).
% call to an undefined but declared predicate
:- public(foo/0).
output :-
foo.
% call to an undefined local predicate
output(A) :-
bar(A).
% misspelt call to Prolog built-in predicate
output(A) :-
writr(A).
:- end_object.
% singleton variables in opening object directive
:- object(singletons(L)).
% singleton variables in predicate clause
predicate(A) :-
write(C).
:- end_object.
:- object(plredef).
% redefinition of a Prolog built-in predicate
write(_).
:- end_object.
:- object(lgtredef).
% redefinition of Logtalk built-in predicate
current_object(_).
:- end_object.
% references to unknown entities in object opening directive
:- object(unknownrefs,
implements(protocol),
imports(category),
extends(object)).
:- end_object.
:- object(portability).
:- public(predicate/0).
% clause with calls to non-ISO Prolog standard predicates
predicate :-
compare(Result, first, second),
retractall(result(Result, _)),
sort([], []),
consult(file).
:- end_object.