Closed
Description
There is a weird behavior when calling native
when importing scala.scalajs.js.native
.
See this example to reproduce the problem.
Compiler version
3.1.0 (Scala.js)
Minimized code
import scala.scalajs.js.native
@js.native
trait OnTabReplacedDetails extends js.Object {
val replacedTabId: Int = native
}
Output
[error] -- Error: /scala-js-chrome/bindings/src/main/scala/chrome/webNavigation/bindings/OnTabReplacedDetails.scala:11:27
[error] 11 | val replacedTabId: Int = native
[error] | ^^^^^^
[error] | Concrete members of JS native types may only call js.native.
[error] one error found
Expectation
The code should behave just like calling js.native
.