aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-09-29 17:29:53 +0200
committerMartin Odersky <odersky@gmail.com>2015-09-29 19:18:53 +0200
commit9c8e247d8900f3fb6f497bc5e269b68f6bc967b7 (patch)
tree1d95772bcf702e407b018eccec7913d7b6563a79 /tests/neg/typers.scala
parent7d3a0064aba0cfe74f7eea7bb43b913cd2c224c7 (diff)
downloaddotty-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 'tests/neg/typers.scala')
-rw-r--r--tests/neg/typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/neg/typers.scala b/tests/neg/typers.scala
index b5bd1fa2c..9fcc63e38 100644
--- a/tests/neg/typers.scala
+++ b/tests/neg/typers.scala
@@ -22,11 +22,11 @@ object typers {
val z: Int
def z(): String // error: double def
- def f(x: Any) = () // error: double def
+ def f(x: Any) = () // OK!
def f(x: AnyRef): AnyRef
def g(x: Object): Unit
- def g[T](x: T): T = x // error: double def
+ def g[T](x: T): T = x // OK!
}