Skip to content

Commit

Permalink
Fix test when abstract override is needed.
Browse files Browse the repository at this point in the history
There was a transcription error from scalac which caused the scope
of a `!` to be wrong.
  • Loading branch information
odersky committed Aug 21, 2015
1 parent 4a78c89 commit cc5dce5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/transform/SuperAccessors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
val member = sym.overridingSymbol(clazz)
if (mix != tpnme.EMPTY ||
!member.exists ||
!(member is AbsOverride) && member.isIncompleteIn(clazz))
!((member is AbsOverride) && member.isIncompleteIn(clazz)))
ctx.error(
i"${sym.showLocated} is accessed from super. It may not be abstract unless it is overridden by a member declared `abstract' and `override'",
sel.pos)
Expand Down
1 change: 1 addition & 0 deletions test/dotc/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class tests extends CompilerTest {

@Test def new_all = compileFiles(newDir, twice)

@Test def neg_abstractOverride() = compileFile(negDir, "abstract-override", xerrors = 2)
@Test def neg_blockescapes() = compileFile(negDir, "blockescapesNeg", xerrors = 1)
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4)
@Test def neg_typedidents() = compileFile(negDir, "typedIdents", xerrors = 2)
Expand Down

0 comments on commit cc5dce5

Please sign in to comment.