diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-21 14:29:26 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-24 14:57:49 +0100 |
commit | f4d6c0f829cf3102e31fae020442d5e55998bcee (patch) | |
tree | 2c0ccdad09f70dffe1a57b5fce8a7eb2e79ff78a /src/dotty/tools/dotc/core | |
parent | 8d94a935e8b980267c273ea13d2c732b86067f8f (diff) | |
download | dotty-f4d6c0f829cf3102e31fae020442d5e55998bcee.tar.gz dotty-f4d6c0f829cf3102e31fae020442d5e55998bcee.tar.bz2 dotty-f4d6c0f829cf3102e31fae020442d5e55998bcee.zip |
More robust isSetter test.
Avoids cyclic references caused by forcing info too early.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 9801cb629..592a4ff45 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -432,7 +432,7 @@ object SymDenotations { final def isSetter(implicit ctx: Context) = (this is Accessor) && originalName.isSetterName && - info.firstParamTypes.nonEmpty // to avoid being fooled by var x_= : Unit = ... + (!isCompleted || info.firstParamTypes.nonEmpty) // to avoid being fooled by var x_= : Unit = ... /** is this the constructor of a class? */ final def isClassConstructor = name == nme.CONSTRUCTOR |