diff options
author | Martin Odersky <odersky@gmail.com> | 2015-09-29 17:29:53 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-29 19:18:53 +0200 |
commit | 9c8e247d8900f3fb6f497bc5e269b68f6bc967b7 (patch) | |
tree | 1d95772bcf702e407b018eccec7913d7b6563a79 /src/dotty/tools/dotc/typer/Checking.scala | |
parent | 7d3a0064aba0cfe74f7eea7bb43b913cd2c224c7 (diff) | |
download | dotty-9c8e247d8900f3fb6f497bc5e269b68f6bc967b7.tar.gz dotty-9c8e247d8900f3fb6f497bc5e269b68f6bc967b7.tar.bz2 dotty-9c8e247d8900f3fb6f497bc5e269b68f6bc967b7.zip |
Matching denotations should take infos into account
Whenchecking whether two denotations match it is not enough
to look at the signatures. The signatures might match (on the
parameters) but the actual parametre types might be different.
The change always tests infos after signatures, effectively
turning the signature test into a pre-filter.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Checking.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala index 8376dd4e9..9092523db 100644 --- a/src/dotty/tools/dotc/typer/Checking.scala +++ b/src/dotty/tools/dotc/typer/Checking.scala @@ -312,7 +312,7 @@ trait Checking { def checkDecl(decl: Symbol): Unit = { for (other <- seen(decl.name)) { typr.println(i"conflict? $decl $other") - if (decl.signature matches other.signature) { + if (decl.matches(other)) { def doubleDefError(decl: Symbol, other: Symbol): Unit = { def ofType = if (decl.isType) "" else d": ${other.info}" def explanation = |