Skip to content

Commit e663ae5

Browse files
committed
WIP
1 parent a9cf295 commit e663ae5

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ trait BCodeHelpers extends BCodeIdiomatic {
226226
tpe match
227227
case dotty.tools.dotc.transform.TypeB.None => TypeHints.TypeB.NO_HINT
228228
case dotty.tools.dotc.transform.TypeB.M(index) => new TypeHints.TypeB(TypeHints.TypeB.M_KIND, index)
229-
case dotty.tools.dotc.transform.TypeB.K(index) => ???
229+
case dotty.tools.dotc.transform.TypeB.K(index) => new TypeHints.TypeB(TypeHints.TypeB.K_KIND, index)
230230
// case _ =>
231231
// report.error("unexpected type in to Java TypeB: " + tpe)
232232
// TypeHints.TypeB.NO_HINT // fallback, should not happen
@@ -244,7 +244,7 @@ trait BCodeHelpers extends BCodeIdiomatic {
244244
val attr = new MethodReturnType(typeB)
245245
mw.visitAttribute(attr)
246246
case dotty.tools.dotc.transform.TypeB.None => //do nothing
247-
case dotty.tools.dotc.transform.TypeB.K(index) => ???
247+
case dotty.tools.dotc.transform.TypeB.K(index) =>
248248
// case _ =>
249249
// report.error("Unexpected type for method return type attribute: " + tpe)
250250

compiler/src/dotty/tools/dotc/transform/ErasurePreservation.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class ErasurePreservation extends MiniPhase with InfoTransformer {
3333
// println(tr.symbol.owner.paramSymss)
3434
if tr.isRef(defn.ByteClass) then TypeA.Byte else
3535
if tr.isRef(defn.CharClass) then TypeA.Char else
36-
if tr.isRef(defn.DoubleClass) then TypeA.Double else
37-
if tr.isRef(defn.FloatClass) then TypeA.Float else
36+
if tr.isRef(defn.DoubleClass) then TypeA.Double else
37+
if tr.isRef(defn.FloatClass) then TypeA.Float else
3838
if tr.isRef(defn.IntClass) then TypeA.Int else
39-
if tr.isRef(defn.LongClass) then TypeA.Long else
39+
if tr.isRef(defn.LongClass) then TypeA.Long else
4040
if tr.isRef(defn.ShortClass) then TypeA.Short else
41-
if tr.isRef(defn.BooleanClass) then TypeA.Boolean else
41+
if tr.isRef(defn.BooleanClass) then TypeA.Boolean else
4242
if tr.symbol.isTypeParam then
4343
val ind = tr.symbol.owner.paramSymss.head.indexWhere(tr.isRef(_))
4444
if ind != -1 then TypeA.M(ind)
@@ -56,6 +56,7 @@ class ErasurePreservation extends MiniPhase with InfoTransformer {
5656
val ind = owner.typeParams.indexOf(tr.symbol)
5757
if ind != -1 then TypeB.K(ind) else TypeB.None
5858
else
59+
println(i"$tp")
5960
???
6061
// val ind = owner.paramSymss.headOption match
6162
// case None => assert(false, i"Got unexpected type ${tp}")

0 commit comments

Comments
 (0)