>>> func inc(x: Int64): return x + 1 end
>>> traits_of(inc)
none
We expect
pure, transform, linear
The most likely culprit is that the argument x has empty traits from Sema's declaration visitor. (That's because there is no expression for x to initialize against.) The remedy is to have Sema's FunctionDef visitor set the parameter to all traits.
We expect
The most likely culprit is that the argument
x
has empty traits from Sema'sdeclaration
visitor. (That's because there is no expression forx
to initialize against.) The remedy is to have Sema'sFunctionDef
visitor set the parameter to all traits.