We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The polymorphic type is translated incorrectly according to the following example test.enc.
test.enc
active class Base[t] var v : t def init(v : t) : unit this.v = v end def base() : t this.v end end active class Foo def foo[sharable ty](arg : Fut[ty]) : ty get(arg ~~> fun(x : ty) : ty => get((new Base[ty](x)) ! base())) end end active class Main def main() : unit val arg = (new Base[int](42)) ! base() println("{}", get((new Foo) ! foo[int](arg))) end end
Here is the error message.
$ encorec --run test.enc test_src/Foo.encore.c:208:38: error: use of undeclared identifier '_enc__type_ty' _enc__type_init__test_Base(_new_0, _enc__type_ty); ^ 1 error generated. *** Compilation failed with exit code 1 ***
The text was updated successfully, but these errors were encountered:
Allow closures to use method type parameters
e9e23e2
This commit fixes a bug where closures did not properly capture type parameters of methods. A test has been added. Fixes parapluu#809.
Successfully merging a pull request may close this issue.
The polymorphic type is translated incorrectly according to the following example
test.enc
.Here is the error message.
The text was updated successfully, but these errors were encountered: