-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:scala.jsitype:bug
Description
Compiler version
3.0.0
Minimized code
import scala.scalajs.js
import scala.scalajs.js.annotation.*
object A {
@js.native
trait Bag extends js.Any {
val str: String
}
trait NonNativeBagHolderTrait(val bag: Bag) extends js.Any // error
}
Output
-- Error: tests/neg-scalajs/js-native-exports.scala:11:36 --------------------------------------------------------------
11 | trait NonNativeBagHolderTrait(val bag: Bag) extends js.Any // error
^^^^^^^^^^^^
Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
Expectation
no error, like if val bag: Bag
is moved from trait params to the body
Metadata
Metadata
Assignees
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:scala.jsitype:bug