encore
encore copied to clipboard
Incorrect translation of poly type in Stream
This issue is similar to the issue #809 . The main difference is that the issue occurs in Stream.
active class Foo[t]
stream produce(var n : int, v : t) : t
while n>0 do
yield(v)
n -= 1
end
end
end
active class Main
def main() : unit
val foo = new Foo[int]
val s = foo!produce(10, 42)
end
end
The error message is similar to #809
failedPolyTypeStreamWithObject_src/Foo.encore.c:228:46: error: use of undeclared identifier '_enc__type_t'
encore_trace_polymorphic_variable((*_ctx), _enc__type_t, _enc__arg_v);
^
1 error generated.
*** Compilation failed with exit code 1 ***
It looks like it could be the same error. Perhaps merging this issue with the previous.