A type checking issue
Posted: 27 Sep 2013 10:16
Hello Thomas,
my program has thrown an access violation. I have stripped the issue down to a small demo:
Create a new "console application"-project (in VIP 7.4 build 7402) and put this code to main.pro
When running it, the call to doNothing/2 throws the access violation. I suppose, VIP's intended behavior would be a type mismatch error at compile time.
Best regards,
Martin
my program has thrown an access violation. I have stripped the issue down to a small demo:
Create a new "console application"-project (in VIP 7.4 build 7402) and put this code to main.pro
Code: Select all
interface myObj
open core
domains
testPredicate = (integer, tuple{integer, integer}).
properties
test : testPredicate (o).
end interface myObj
%----
class myObj : myObj
open core
constructors
new : (testPredicate).
end class myObj
%----
implement myObj
open core
facts
test : testPredicate.
clauses
new(Test):-
test := Test.
end implement myObj
%====
implement main
open core
class predicates
doNothing : (AnyDomain, AnyDomain).
clauses
doNothing(_, _).
clauses
run():-
console::init(),
MyObj == myObj::new({ (A, B):- doNothing(A, B) }),
MyObj:test(1, tuple(1, 2)).
end implement main
goal
mainExe::run(main::run).
Best regards,
Martin