Skip to content

Commit 39cb41a

Browse files
committed
More robust isSetter test.
Avoids cyclic references caused by forcing info too early.
1 parent c6a6d12 commit 39cb41a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ object SymDenotations {
432432
final def isSetter(implicit ctx: Context) =
433433
(this is Accessor) &&
434434
originalName.isSetterName &&
435-
info.firstParamTypes.nonEmpty // to avoid being fooled by var x_= : Unit = ...
435+
(!isCompleted || info.firstParamTypes.nonEmpty) // to avoid being fooled by var x_= : Unit = ...
436436

437437
/** is this the constructor of a class? */
438438
final def isClassConstructor = name == nme.CONSTRUCTOR

0 commit comments

Comments
 (0)