Closed
Description
Minimized code
after compiling the following code:
// Test.tasty
object Test {
class Givens {
given Int = 23
given String = "the string"
}
class Foo {
val g: Givens = Givens()
import g.{given Int}
}
}
use scalac -decompile Test.tasty
Output
@scala.annotation.internal.SourceFile("sandbox/exports/example.scala") object Test {
class Givens() {
final def given_Int: scala.Int = 23
final def given_String: scala.Predef.String = "the string"
}
class Foo() {
val g: Test.Givens = new Test.Givens()
import Foo.this.g.{}
}
}
Expectation
@scala.annotation.internal.SourceFile("sandbox/exports/example.scala") object Test {
class Givens() {
final def given_Int: scala.Int = 23
final def given_String: scala.Predef.String = "the string"
}
class Foo() {
val g: Test.Givens = new Test.Givens()
import Foo.this.g.{given Int}
}
}
and also a ways to reflect on this in tasty reflect