diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-12 18:03:35 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-12 18:04:53 +0200 |
commit | 472d7114da29c869e3fa2e97b7045b797937737b (patch) | |
tree | c2ad731b208efd982314f9a762f9a03946ea58a3 /src/dotty/tools/dotc/core/Denotations.scala | |
parent | 843f9769f5fc5572f06e058af65e43f81b8d432d (diff) | |
download | dotty-472d7114da29c869e3fa2e97b7045b797937737b.tar.gz dotty-472d7114da29c869e3fa2e97b7045b797937737b.tar.bz2 dotty-472d7114da29c869e3fa2e97b7045b797937737b.zip |
Add matchesLoosely
For overriding checks we need a concept where a val can match a def.
Normal matches does not provide this.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 022230ff8..f4e9746c7 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -202,7 +202,7 @@ object Denotations { def matchingDenotation(site: Type, targetType: Type)(implicit ctx: Context): SingleDenotation = if (isOverloaded) atSignature(targetType.signature).matchingDenotation(site, targetType) - else if (exists && !(site.memberInfo(symbol) matches targetType)) + else if (exists && !site.memberInfo(symbol).matchesLoosely(targetType)) NoDenotation else asSingleDenotation |