diff options
author | Paul Phillips <paulp@improving.org> | 2009-11-17 20:51:23 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-11-17 20:51:23 +0000 |
commit | 32b04c2801b1eb24e28fe4deafe62c995472e957 (patch) | |
tree | 6977476c5dd269618486971165dd7ff4814059c6 /src | |
parent | 79cbdefa47d77b6785b614b895dc03ede84a7328 (diff) | |
download | scala-32b04c2801b1eb24e28fe4deafe62c995472e957.tar.gz scala-32b04c2801b1eb24e28fe4deafe62c995472e957.tar.bz2 scala-32b04c2801b1eb24e28fe4deafe62c995472e957.zip |
Partial fix for #2625.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 7 |
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 |