aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 56b168102..e1550d529 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -533,17 +533,11 @@ object SymDenotations {
* inClass <-- find denot.symbol class C { <-- symbol is here
*
* site: Subtype of both inClass and C
- *
*/
final def matchingSymbol(inClass: Symbol, site: Type)(implicit ctx: Context): Symbol = {
var denot = inClass.info.nonPrivateDecl(name)
- if (denot.isTerm) { // types of the same name always match
- val targetType = site.memberInfo(symbol)
- if (denot.isOverloaded)
- denot = denot.atSignature(targetType.signature) // seems we need two kinds of signatures here
- if (!(site.memberInfo(denot.symbol) matches targetType))
- denot = NoDenotation
- }
+ if (denot.isTerm) // types of the same name always match
+ denot = denot.matchingDenotation(site, site.memberInfo(symbol))
denot.symbol
}