Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Nov 9, 2023
1 parent f1ae9b3 commit d041410
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
// skip this member
return NoSymbol

// Adapt the flags of getters so they become like vals/vars instead
if flags.isAllOf(Method | Accessor) && !name.toString().endsWith("_=") then
flags &~= Method | Accessor
if !flags.is(StableRealizable) then flags |= Mutable

name = name.adjustIfModuleClass(flags)
if (flags.is(Method))
name =
Expand Down Expand Up @@ -620,7 +625,12 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
setClassInfo(denot, tp, fromScala2 = true, selfInfo)
NamerOps.addConstructorProxies(denot.classSymbol)
case denot =>
val tp1 = translateTempPoly(tp)
val tp0 = translateTempPoly(tp)
val tp1 =
if !denot.is(Param) && !denot.is(Method) && tp0.isInstanceOf[ExprType] then
tp0.asInstanceOf[ExprType].resultType
else tp0

denot.info =
if (tag == ALIASsym) TypeAlias(tp1)
else if (denot.isType) checkNonCyclic(denot.symbol, tp1, reportErrors = false)
Expand Down

0 comments on commit d041410

Please sign in to comment.