summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala10
-rw-r--r--test/files/neg/abstract.check6
-rw-r--r--test/files/neg/bug415.check3
3 files changed, 12 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 66664a2306..1565e88a0b 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -949,10 +949,12 @@ trait Symbols requires SymbolTable {
else ""
/** String representation of symbol's definition */
- final def defString: String =
- compose(List(flagsToString(if (settings.debug.value) flags else flags & ExplicitFlags),
- keyString,
- varianceString + nameString + infoString(rawInfo)))
+ final def defString: String = {
+ val f = if (settings.debug.value) flags
+ else if (owner.isRefinementClass) flags & ExplicitFlags & ~OVERRIDE
+ else flags & ExplicitFlags
+ compose(List(flagsToString(f), keyString, varianceString + nameString + infoString(rawInfo)))
+ }
/** Concatenate strings separated by spaces */
private def compose(ss: List[String]): String =
diff --git a/test/files/neg/abstract.check b/test/files/neg/abstract.check
index 1f888dcceb..87fb66f946 100644
--- a/test/files/neg/abstract.check
+++ b/test/files/neg/abstract.check
@@ -1,7 +1,9 @@
-abstract.scala:5 error: malformed type: A.this.T#T
+abstract.scala:5 error: method bar cannot be accessed in A.this.T
+ because its instance type ()A.this.T#T contains a malformed type: A.this.T#T
def foo1 = bar().bar();
^
-abstract.scala:7 error: malformed type: A#T
+abstract.scala:7 error: method bar cannot be accessed in A
+ because its instance type ()A#T contains a malformed type: A#T
def foo3 = baz().bar();
^
two errors found
diff --git a/test/files/neg/bug415.check b/test/files/neg/bug415.check
index 7a7c5cf4f5..c6c9805aa6 100644
--- a/test/files/neg/bug415.check
+++ b/test/files/neg/bug415.check
@@ -1,4 +1,5 @@
-bug415.scala:8 error: malformed type: A#T
+bug415.scala:8 error: method x cannot be accessed in A
+ because its instance type => A#T contains a malformed type: A#T
val y: String = a.x;
^
one error found