summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-09-22 16:38:22 +0000
committerMartin Odersky <odersky@gmail.com>2006-09-22 16:38:22 +0000
commit5656170f7cf3251ba26eaea55939e951813a154b (patch)
tree4ebacace7bd90a2bb7ea350da6f70380a9f0508a
parenta2d886a301e317b81d5b59bb3a60b33a7be650ea (diff)
downloadscala-5656170f7cf3251ba26eaea55939e951813a154b.tar.gz
scala-5656170f7cf3251ba26eaea55939e951813a154b.tar.bz2
scala-5656170f7cf3251ba26eaea55939e951813a154b.zip
simplified printing of refinement types -- no m...
simplified printing of refinement types -- no more override flags adapted two check files in tests
-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