Skip to content

Commit

Permalink
Eagerly enter default getters into scope
Browse files Browse the repository at this point in the history
For backport to 2.12.x of scala/scala@87be453c
  • Loading branch information
adriaanm committed Oct 16, 2018
1 parent 61a169a commit ed5ddcb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,14 @@ trait Namers {
if (isEnumConstant(tree))
tree.symbol setInfo ConstantType(Constant(tree.symbol))
case tree @ DefDef(_, nme.CONSTRUCTOR, _, _, _, _) =>
if (mexists(tree.vparamss)(_.mods.hasDefault))
enterDefaultGetters(tree.symbol, tree, tree.vparamss, tree.tparams)

sym setInfo completerOf(tree)
case tree @ DefDef(mods, name, tparams, _, _, _) =>
if (mexists(tree.vparamss)(_.mods.hasDefault))
enterDefaultGetters(tree.symbol, tree, tree.vparamss, tree.tparams)

val bridgeFlag = if (mods hasAnnotationNamed tpnme.bridgeAnnot) BRIDGE | ARTIFACT else 0
sym setFlag bridgeFlag
val completer =
Expand Down

0 comments on commit ed5ddcb

Please sign in to comment.