please check this construction. The compiler (build 7501) throws fatal error c098 : Not synchronized lists for fixed parameters (integer) on it and dumps:
Code: Select all
interface myObject{@Type}
open core
properties
value : @Type.
properties
create : function{myObject{LocalType}} (o).
end interface myObject
%---
class myObject{@Type} : myObject{@Type}
end class myObject
%---
implement myObject{@Type}
facts
value : @Type := erroneous.
clauses
create() = myObject{LocalType}::new.
end implement myObject
%===
implement main
open core
clauses
run() :-
StringObj = myObject{string}::new(),
IntegerObj = StringObj:create(),
IntegerObj:value := -3.
end implement main
Code: Select all
interface myObject{@Type}
open core
properties
value : @Type.
predicates
getCreator : () -> function{myObject{LocalType}}.
end interface myObject
%---
class myObject{@Type} : myObject{@Type}
end class myObject
%---
implement myObject{@Type}
facts
value : @Type := erroneous.
clauses
getCreator() = myObject{LocalType}::new.
end implement myObject
%===
implement main
open core
clauses
run() :-
StringObj = myObject{string}::new(),
CreateIntegerObj = StringObj:getCreator(),
IntegerObj = CreateIntegerObj(),
IntegerObj:value := -3.
end implement main
Martin