diff options
author | Paul Phillips <paulp@improving.org> | 2013-09-27 14:07:06 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-10-02 08:59:33 -0700 |
commit | 45183d8d28ff082d9186018b707f9fecb466f14f (patch) | |
tree | 0ffa9012c2f9dbd7769dd5f36587477ebfe12b19 | |
parent | bef9e52d7337dafcc1f507ff1d93241f12f7c6d9 (diff) | |
download | scala-45183d8d28ff082d9186018b707f9fecb466f14f.tar.gz scala-45183d8d28ff082d9186018b707f9fecb466f14f.tar.bz2 scala-45183d8d28ff082d9186018b707f9fecb466f14f.zip |
Remove 'hasDefaultFlag'.
This is the change which broke the compiler until I made the
changes found in 693ecffbaf.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/HasFlags.scala | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index d74fa50dcb..cb070a9843 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2836,7 +2836,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper (e.sym.isType || inBlock || (e.sym.tpe matches e1.sym.tpe))) // default getters are defined twice when multiple overloads have defaults. an // error for this is issued in RefChecks.checkDefaultsInOverloaded - if (!e.sym.isErroneous && !e1.sym.isErroneous && !e.sym.hasDefaultFlag && + if (!e.sym.isErroneous && !e1.sym.isErroneous && !e.sym.hasDefault && !e.sym.hasAnnotation(BridgeClass) && !e1.sym.hasAnnotation(BridgeClass)) { log("Double definition detected:\n " + ((e.sym.getClass, e.sym.info, e.sym.ownerChain)) + "\n " + @@ -2880,7 +2880,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper def matches(stat: Tree, synt: Tree) = (stat, synt) match { // synt is default arg for stat case (DefDef(_, statName, _, _, _, _), DefDef(mods, syntName, _, _, _, _)) => - mods.hasDefaultFlag && syntName.toString.startsWith(statName.toString) + mods.hasDefault && syntName.toString.startsWith(statName.toString) // synt is companion module case (ClassDef(_, className, _, _), ModuleDef(_, moduleName, _)) => @@ -4729,7 +4729,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper * a constructor default, the resulting typer has a constructor context (fixes SI-5543). */ def defDefTyper(ddef: DefDef) = { - val isConstrDefaultGetter = ddef.mods.hasDefaultFlag && sym.owner.isModuleClass && + val isConstrDefaultGetter = ddef.mods.hasDefault && sym.owner.isModuleClass && nme.defaultGetterToMethod(sym.name) == nme.CONSTRUCTOR newTyper(context.makeNewScope(ddef, sym)).constrTyperIf(isConstrDefaultGetter) } diff --git a/src/reflect/scala/reflect/internal/HasFlags.scala b/src/reflect/scala/reflect/internal/HasFlags.scala index 4e12998ac7..f9fedc687d 100644 --- a/src/reflect/scala/reflect/internal/HasFlags.scala +++ b/src/reflect/scala/reflect/internal/HasFlags.scala @@ -168,8 +168,6 @@ trait HasFlags { // Backward compat section @deprecated( "Use isTrait", "2.10.0") def hasTraitFlag = hasFlag(TRAIT) - @deprecated("Use hasDefault", "2.10.0") - def hasDefaultFlag = hasFlag(DEFAULTPARAM) @deprecated("Use flagString", "2.10.0") def defaultFlagString = flagString @deprecated("Use flagString(mask)", "2.10.0") |