mirror of
https://github.com/apple/pkl.git
synced 2026-04-23 00:38:37 +02:00
Add comment about const check (#859)
This commit is contained in:
@@ -118,6 +118,9 @@ public abstract class ReadPropertyNode extends ExpressionNode {
|
|||||||
.build();
|
.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) {
|
private void checkConst(VmObjectLike receiver) {
|
||||||
if (needsConst && !isConstChecked) {
|
if (needsConst && !isConstChecked) {
|
||||||
CompilerDirectives.transferToInterpreterAndInvalidate();
|
CompilerDirectives.transferToInterpreterAndInvalidate();
|
||||||
|
|||||||
Reference in New Issue
Block a user