You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
Compiling the following program on
development
gives the C-level error
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
).The text was updated successfully, but these errors were encountered: