Skip to content
New issue

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

Incorrect translation of poly type in Stream #818

Open
PhucVH888 opened this issue Jun 8, 2017 · 1 comment
Open

Incorrect translation of poly type in Stream #818

PhucVH888 opened this issue Jun 8, 2017 · 1 comment

Comments

@PhucVH888
Copy link
Contributor

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 ***
@supercooldave
Copy link

It looks like it could be the same error. Perhaps merging this issue with the previous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants