aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-20 10:54:25 +0100
committerTobias Schlatter <tobias@meisch.ch>2014-03-21 11:28:30 +0100
commit72a5f392bf11b6474b351cd81a17d0ceeed13dcc (patch)
tree852be17c2bf42d380eb8078823bca2bfe60b0ccc /test/dotc/tests.scala
parent07939c96715cd5adf7f220d239f61b73dd00edc3 (diff)
downloaddotty-72a5f392bf11b6474b351cd81a17d0ceeed13dcc.tar.gz
dotty-72a5f392bf11b6474b351cd81a17d0ceeed13dcc.tar.bz2
dotty-72a5f392bf11b6474b351cd81a17d0ceeed13dcc.zip
Reverting decision what constitutes a double def.
test case t0273. Was positive in Scala 2, is now deemed to be negative. Two two definitions def a = () => () def a[T] = (p:A) => () do have matching signatures, so should constitute a double definition. I previously thought that we can get away if the two definitions have different result types, but then you immediately have a problem because the denotations have matching signatures for the pruposes of "&" yet cannot be merged. Which of the two definitions would override a definition in a base class is then an arbitrary decision.
Diffstat (limited to 'test/dotc/tests.scala')
-rw-r--r--test/dotc/tests.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 4b52b93c2..ed6f3b5d9 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -53,15 +53,16 @@ class tests extends CompilerTest {
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4)
@Test def neg_typedidents() = compileFile(negDir, "typedIdents", xerrors = 2)
@Test def neg_assignments() = compileFile(negDir, "assignments", xerrors = 3)
- @Test def neg_typers() = compileFile(negDir, "typers", xerrors = 6)
+ @Test def neg_typers() = compileFile(negDir, "typers", xerrors = 10)
@Test def neg_privates() = compileFile(negDir, "privates", xerrors = 2)
@Test def neg_rootImports = compileFile(negDir, "rootImplicits", xerrors = 2)
@Test def neg_templateParents() = compileFile(negDir, "templateParents", xerrors = 3)
- @Test def neg_i39 = compileFile(negDir, "i39", xerrors = 1)
- @Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 4)
- @Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
@Test def neg_autoTupling = compileFile(posDir, "autoTuplingTest", "-language:noAutoTupling" :: Nil, xerrors = 3)
@Test def neg_autoTupling2 = compileFile(negDir, "autoTuplingTest", xerrors = 3)
+ @Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
+ @Test def neg_i39 = compileFile(negDir, "i39", xerrors = 1)
+ @Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 4)
+ @Test def neg_t0273_doubledefs = compileFile(negDir, "t0273", xerrors = 1)
@Test def neg_t0654_polyalias = compileFile(negDir, "t0654", xerrors = 2)
@Test def neg_t1192_legalPrefix = compileFile(negDir, "t1192", xerrors = 1)