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

Tracing polymorphic method arguments broken #362

Closed
EliasC opened this issue Apr 6, 2016 · 4 comments
Closed

Tracing polymorphic method arguments broken #362

EliasC opened this issue Apr 6, 2016 · 4 comments

Comments

@EliasC
Copy link
Contributor

EliasC commented Apr 6, 2016

Compiling the following program on development

class Foo<t>
  def foo(x : t) : void {
    print "Success";
  }

class Bar<t>
  def bar(x : t) : void {
    new Foo<t> ! foo(x);
  }

class Main
  def main() : void {
    new Bar<int> ! bar(42);
  }

gives the C-level error

foo_src/Bar.encore.c:67:37: error: use of undeclared identifier 'this'; did you mean '_this'?
  encore_trace_polymorphic_variable(this->_enc__type_t, _arg_2->f1);
                                    ^~~~
                                    _this
foo_src/Bar.encore.c:46:48: note: '_this' declared here
void* _enc__method_Bar_bar(_enc__active_Bar_t* _this, encore_arg_t _enc__arg_x)
                                               ^

It seems like the C-level self-variable is sometimes called this and sometimes _this. The fix is probably as simple as being consistent with the choice of name (probably _this).

@EliasC EliasC added the bug label Apr 6, 2016
@albertnetymk
Copy link
Contributor

Same one #344, I think.

@EliasC
Copy link
Contributor Author

EliasC commented Apr 6, 2016

I agree! Is it still best to wait for new-ponyrt you think?

@albertnetymk
Copy link
Contributor

Currently, new-ponyrt has been rebased onto dev. Could be merged after disabling tasks, IMO.

@EliasC
Copy link
Contributor Author

EliasC commented Apr 6, 2016

OK, closing this one then.

@EliasC EliasC closed this as completed Apr 6, 2016
@EliasC EliasC removed the bug label Apr 6, 2016
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