mirror of
https://github.com/apple/pkl.git
synced 2026-04-01 06:33:26 +02:00
Add comment about const check (#859)
This commit is contained in:
@@ -118,6 +118,9 @@ public abstract class ReadPropertyNode extends ExpressionNode {
|
||||
.build();
|
||||
}
|
||||
|
||||
// only ever need to check once per node because `needsConst` is only true in the case of implicit
|
||||
// receivers inside class (and module) bodies, and the const-ness of a resolved property cannot be
|
||||
// changed by subclasses.
|
||||
private void checkConst(VmObjectLike receiver) {
|
||||
if (needsConst && !isConstChecked) {
|
||||
CompilerDirectives.transferToInterpreterAndInvalidate();
|
||||
|
||||
Reference in New Issue
Block a user