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

[AbstractEnum] Parameter default value must be constant #429

Closed
eliasku opened this issue Feb 22, 2016 · 1 comment
Closed

[AbstractEnum] Parameter default value must be constant #429

eliasku opened this issue Feb 22, 2016 · 1 comment

Comments

@eliasku
Copy link
Contributor

eliasku commented Feb 22, 2016

For @:enum abstract types very common to provide default values with one of fields, such as function foo(a:PlayerMode = PlayerMode.DEFAULT). But now annotator can't resolve that @:enum abstract fields is already constants.
image
Repro:

@:enum abstract AbstractEnum(Int) from Int to Int {
    var ONE = 0;
    var TWO = 1;
}

class AbstractEnumParameterDefaultValue {
    public function foo1(type = AbstractEnum.ONE) {}
    public function foo2(type:AbstractEnum = AbstractEnum.ONE) {}
    public function foo3(type:Int = AbstractEnum.ONE) {}
    public function foo4(type:Dynamic = AbstractEnum.ONE) {}
}

Version: 0.9.9, IDEA 14/15, OSX

@EBatTiVo
Copy link
Contributor

Fixed: 451219a

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