mangle
mangle copied to clipboard
bug in type checking
This program does not work:
path(Src, Dst, W) :- edge(Src, Dst, W).
path(Src, Dst, W) :- path(Src, X1, W1), edge(X1, Dst, W2), W = fn:plus(W1, W2).
Error message:
type mismatch: cannot find assignment that works for premise path(Src,X1,W1)
Expected: no error.
The following program works fine:
path(Src, Dst, W) :- edge(Src, Dst, W).
path(Src, Dst, W) :- path(Src, X1, W1), edge(X1, Dst, W2) |> let W = fn:plus(W1, W2).