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

Enum abstract should be String #10098

Closed
Aurel300 opened this issue Jan 30, 2021 · 1 comment
Closed

Enum abstract should be String #10098

Aurel300 opened this issue Jan 30, 2021 · 1 comment

Comments

@Aurel300
Copy link
Member

Another map/abstract-related issue, maybe similar to #9712. This fails compilation on many targets (JS, PHP, Lua), but not others (HL, Eval):

enum abstract Foo(String) {
  var Bar;
}
class Main {
  public static function main():Void {
    new Map<Foo, Int>().exists(Bar);
  }
}

The error is:

Main.hx:6: characters 5-36 : error: Foo should be String
Main.hx:6: characters 5-36 : ... have: (String) -> ...
Main.hx:6: characters 5-36 : ... want: (Foo) -> ...
@RealyUniqueName
Copy link
Member

Seems to compile on static targets, but fail on dynamic targets...

@RealyUniqueName RealyUniqueName added this to the Release 4.2 milestone Feb 2, 2021
RealyUniqueName added a commit that referenced this issue Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants