-
Notifications
You must be signed in to change notification settings - Fork 65
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
JSMacro should support union types #70
Comments
hey you need this import
|
Ah thanks. The import is package private, so I can't use it for my own stuff. I copied the code, but it produces strange errors in Play that it can't find its config files... |
I'm not sure what to do about this. The implicit that we use is not safe in the general case, which is why we no longer export it (see scala-js/scala-js#2070 for details), but you can easily provide your own. Or cast yourself, like you figured out. Would @sjrd have any idea, perhaps? |
What do you mean, it's not safe? |
safe as in, you can get runtime exceptions |
Thanks. Then I'll use my internal version for now. |
When using union types, one must cast to js.Any, e.g.:
JSMacro doesn't know about this, so this compiler error comes up:
The text was updated successfully, but these errors were encountered: