diff options
author | Martin Odersky <odersky@gmail.com> | 2008-04-08 10:54:54 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-04-08 10:54:54 +0000 |
commit | b26701964007ab9126a136d52a40615842a36422 (patch) | |
tree | 9fe3299a043aac66e9ffb8db238fd5b3d7caef24 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 3884f6e1ce4feff64e816e426d318f9cb10036a8 (diff) | |
download | scala-b26701964007ab9126a136d52a40615842a36422.tar.gz scala-b26701964007ab9126a136d52a40615842a36422.tar.bz2 scala-b26701964007ab9126a136d52a40615842a36422.zip |
fixed t607, t699
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 2cdbb3d57d..db35ab1681 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -972,9 +972,11 @@ trait Typers { self: Analyzer => } else { error(parent.pos, psym+" needs to be a trait be mixed in") } - } else if (psym hasFlag FINAL) { - error(parent.pos, "illegal inheritance from final class") - } else if (psym.isSealed && !phase.erasedTypes) { + } + if (psym hasFlag FINAL) { + error(parent.pos, "illegal inheritance from final "+psym) + } + if (psym.isSealed && !phase.erasedTypes) { if (context.unit.source.file != psym.sourceFile) error(parent.pos, "illegal inheritance from sealed "+psym) else |