summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/Symbols.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/Symbols.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 1326e89774..dcb2097c5f 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -1166,9 +1166,10 @@ trait Symbols {
def renamedGetter = accessors find (_.originalName startsWith (getterName + "$"))
val accessorName = origGetter orElse renamedGetter
- accessorName getOrElse {
- throw new Error("Could not find case accessor for %s in %s".format(field, this))
- }
+ // This fails more gracefully rather than throw an Error as it used to because
+ // as seen in #2625, we can reach this point with an already erroneous tree.
+ accessorName getOrElse NoSymbol
+ // throw new Error("Could not find case accessor for %s in %s".format(field, this))
}
fields map findAccessor