Skip to content

Commit 3e82c33

Browse files
smartermichelou
authored andcommitted
Test tasty backwards compatibility
This currently fail with: MethodType(List(y), List(TypeRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),Predef),String)), TypeRef(ThisType(TypeRef(NoPrefix,module class <empty>)),class Bar)) (of class dotty.tools.dotc.core.Types$CachedMethodType) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1154) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1313) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1137) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1313) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.$anonfun$24(TreeUnpickler.scala:1138) at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1138) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1313) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStat(TreeUnpickler.scala:998) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats$$anonfun$1(TreeUnpickler.scala:1036) at dotty.tools.tasty.TastyReader.until(TastyReader.scala:125) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats(TreeUnpickler.scala:1036) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readStats(TreeUnpickler.scala:1040) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1166) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1313) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1158) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1313) at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.createMemberSymbol$$anonfun$1(TreeUnpickler.scala:614) at dotty.tools.dotc.core.Annotations$.dotty$tools$dotc$core$Annotations$$anon$2$$_$$lessinit$greater$$anonfun$1(Annotations.scala:162) at dotty.tools.dotc.core.Annotations$LazyBodyAnnotation.tree(Annotations.scala:150) at dotty.tools.dotc.typer.Inliner$.bodyToInline(Inliner.scala:53) at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:157) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:70) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1494) at scala.collection.immutable.List.mapConserve(List.scala:472) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1494) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1388) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:73) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:78) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformBlock$$anonfun$1$$anonfun$1(tpd.scala:1211) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.loop$2(tpd.scala:1193) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformStats(tpd.scala:1206) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformBlock(tpd.scala:1211) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1402) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:49) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:66) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:56) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:64) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.loop$2(tpd.scala:1206) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformStats(tpd.scala:1206) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformStats(tpd.scala:1208) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:64) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:64) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1465) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:73) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:64) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.loop$2(tpd.scala:1206) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformStats(tpd.scala:1206) at dotty.tools.dotc.ast.tpd$TreeMapWithPreciseStatContexts.transformStats(tpd.scala:1208) at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1476) at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:73) at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:78) at dotty.tools.dotc.transform.Inlining$$anon$2.transform(Inlining.scala:56) at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:18) at dotty.tools.dotc.transform.Inlining.run(Inlining.scala:28)
1 parent 26ab31a commit 3e82c33

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Bar(using x: Int)(y: String)
2+
object Bar:
3+
given Int = 1
4+
inline def foo =
5+
println(new Bar()(""))
6+
println(Bar()(""))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@main def Test =
2+
given Int = 1
3+
println(new Bar(""))
4+
println(Bar(""))
5+
println(Bar.foo)

0 commit comments

Comments
 (0)