diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-31 15:01:06 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:12 +0200 |
commit | 130069ad787ca20e960d57e11e6f4911e3bed5a0 (patch) | |
tree | 01bd59f3538ff2a90ee67377166c65869d733c4f /compiler/src/dotty/tools/dotc/typer/Namer.scala | |
parent | 24f40bc76493410f2688c8a74028ecb1db7306bf (diff) | |
download | dotty-130069ad787ca20e960d57e11e6f4911e3bed5a0.tar.gz dotty-130069ad787ca20e960d57e11e6f4911e3bed5a0.tar.bz2 dotty-130069ad787ca20e960d57e11e6f4911e3bed5a0.zip |
Cleanups of NameOps
Remove unused functionality
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Namer.scala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala index 78a1cd9c3..19b6dfa71 100644 --- a/compiler/src/dotty/tools/dotc/typer/Namer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala @@ -6,6 +6,7 @@ import core._ import ast._ import Trees._, Constants._, StdNames._, Scopes._, Denotations._, Comments._ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ +import NameKinds.DefaultGetterName import ast.desugar, ast.desugar._ import ProtoTypes._ import util.Positions._ @@ -1012,12 +1013,8 @@ class Namer { typer: Typer => * the corresponding parameter where bound parameters are replaced by * Wildcards. */ - def rhsProto = { - val name = sym.asTerm.name - val idx = name.defaultGetterIndex - if (idx < 0) WildcardType - else { - val original = name.defaultGetterToMethod + def rhsProto = sym.asTerm.name collect { + case DefaultGetterName(original, idx) => val meth: Denotation = if (original.isConstructorName && (sym.owner is ModuleClass)) sym.owner.companionClass.info.decl(nme.CONSTRUCTOR) @@ -1035,8 +1032,7 @@ class Namer { typer: Typer => paramProto(defaultAlts.head.info.widen.paramInfoss, idx) else WildcardType - } - } + } getOrElse WildcardType // println(s"final inherited for $sym: ${inherited.toString}") !!! // println(s"owner = ${sym.owner}, decls = ${sym.owner.info.decls.show}") |