-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Compiler version
Scala 3.8.0-RC1-bin-20250814-0cf7a18-NIGHTLY
Minimized code
//> using scala 3.nightly
import scala.language.implicitConversions
import scala.language.dynamics
given Conversion[Int, Int & Dynamic] = _.asInstanceOf
extension (i: Int & Dynamic)
def selectDynamic(s: String): Unit = println(s)
@main def main =
4.fooMember
Output
Fails to compile:
[error] value fooMember is not a member of Int
[error] 4.fooMember
[error] ^^^^^^^^^^^
Expectation
It compiles and prints fooMember
. The implicit conversion should be called and int should be converted into Int & Dynamic
, which should make this work.
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label