|
| 1 | +/** Decompiled from out/runTestFromTasty/run/valueclasses-pavlov/Box1.class */ |
| 2 | +final class Box1(val value: scala.Predef.String) extends scala.AnyVal() { |
| 3 | + override def hashCode(): scala.Int = Box1.this.value.hashCode() |
| 4 | + override def equals(x$0: scala.Any): scala.Boolean = x$0 match { |
| 5 | + case x$0: Box1 @scala.unchecked() => |
| 6 | + Box1.this.value.==(x$0.value) |
| 7 | + case _ => |
| 8 | + false |
| 9 | + } |
| 10 | +} |
| 11 | +object Box1 extends scala.AnyRef() |
| 12 | +/** Decompiled from out/runTestFromTasty/run/valueclasses-pavlov/Box2.class */ |
| 13 | +final class Box2(val value: scala.Predef.String) extends scala.AnyVal() with Foo { |
| 14 | + def box1(x: Box1): scala.Predef.String = "box1: ok" |
| 15 | + def box2(x: Box2): scala.Predef.String = "box2: ok" |
| 16 | + override def hashCode(): scala.Int = Box2.this.value.hashCode() |
| 17 | + override def equals(x$0: scala.Any): scala.Boolean = x$0 match { |
| 18 | + case x$0: Box2 @scala.unchecked() => |
| 19 | + Box2.this.value.==(x$0.value) |
| 20 | + case _ => |
| 21 | + false |
| 22 | + } |
| 23 | +} |
| 24 | +object Box2 extends scala.AnyRef() |
| 25 | +/** Decompiled from out/runTestFromTasty/run/valueclasses-pavlov/C.class */ |
| 26 | +class C(x: scala.Predef.String) { |
| 27 | + def this() = { |
| 28 | + this("") |
| 29 | + () |
| 30 | + } |
| 31 | +} |
| 32 | +/** Decompiled from out/runTestFromTasty/run/valueclasses-pavlov/Foo.class */ |
| 33 | +trait Foo() extends scala.Any { |
| 34 | + def box1(x: Box1): scala.Predef.String |
| 35 | + def box2(x: Box2): scala.Predef.String |
| 36 | +} |
| 37 | +/** Decompiled from out/runTestFromTasty/run/valueclasses-pavlov/Test.class */ |
| 38 | +object Test { |
| 39 | + def main(args: scala.Array[scala.Predef.String]): scala.Unit = { |
| 40 | + val b1: Box1 = new Box1("") |
| 41 | + val b2: Box2 = new Box2("") |
| 42 | + val f: Foo = b2 |
| 43 | + scala.Predef.println(f.box1(b1)) |
| 44 | + scala.Predef.println(f.box2(b2)) |
| 45 | + } |
| 46 | +} |
0 commit comments