-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
to Float on abstract is getting ignored, can't do math operations #11576
Comments
Hej, It works with that : enum abstract Foo(Float) from Float to Float {
var a : Float = 10000001;
} But I agree it would be cool if it did the conversion by itself |
Yes, there are ways to get around it but it changes what the intention of the code is, I don't want to allow any float for Foo. The solution I do is type hitting Foo at declaration But I don't understand why when I specified that the type should be to Float |
Current workaround is to add |
|
This results in the following error:
But everything here is typed and declared as
Float
so why is it that I can't do the subtraction?The text was updated successfully, but these errors were encountered: