Skip to content

Scala.JS regression: class arg defaulting to js.native #11888

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

Closed
japgolly opened this issue Mar 25, 2021 · 2 comments
Closed

Scala.JS regression: class arg defaulting to js.native #11888

japgolly opened this issue Mar 25, 2021 · 2 comments

Comments

@japgolly
Copy link
Contributor

japgolly commented Mar 25, 2021

Compiler version

3.0.0-RC2-bin-20210322-4035f51-NIGHTLY with Scala.JS 1.5.0

Minimized code

import scala.scalajs.js
import scala.scalajs.js.annotation._

@JSGlobal
@js.native
class X(x: js.Object = js.native) extends js.Object

Output

[error] 6 |class X(x: js.Object = js.native) extends js.Object
[error]   |                       ^^^^^^^^^
[error]   |         js.native may only be used as stub implementation in facade types

Expectation

It should compile.

@japgolly
Copy link
Contributor Author

/cc @sjrd

@sjrd
Copy link
Member

sjrd commented Mar 25, 2021

Duplicate of #11592

@sjrd sjrd closed this as completed Mar 25, 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