You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below compiles, but produces incorrect results --- 'hash' is referred to, but not given a value (it should come from %, in the same way as q). The problem is due to the conditional test '% has BasicType' not being noted correctly by the with body.
The function zz shows the same behaviour, but is less tractable, as the 'first' function depends on the value of T.
Trivial workaround for the first problem is to uncomment the commented line.
#include "foamlib"
I ==> SingleInteger;
Foo: Category == with {
f: % -> I;
q: % -> I;
default {
basic? ==> % has BasicType;
f(n: %): I == {
basic? => hash n;
q n;
}
-- if % has BasicType then { qq(a: %): I == never }
zz(T: BasicType, x: %): T == if % has ListCategory T then first x else never;
}
}
The text was updated successfully, but these errors were encountered:
The code below compiles, but produces incorrect results --- 'hash' is referred to, but not given a value (it should come from %, in the same way as q). The problem is due to the conditional test '% has BasicType' not being noted correctly by the with body.
The function zz shows the same behaviour, but is less tractable, as the 'first' function depends on the value of T.
Trivial workaround for the first problem is to uncomment the commented line.
The text was updated successfully, but these errors were encountered: