Fix: globbing--read extra storage from owner instead of receiver (#607)

This fixes an issue where a PklBugException is thrown when a globbed
read/import is amended.
This commit is contained in:
Daniel Chao
2024-08-05 10:27:50 -07:00
committed by GitHub
parent 604b042d1b
commit d5e86ed077
6 changed files with 59 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ public final class ImportGlobMemberBodyNode extends ExpressionNode {
@Override
public Object executeGeneric(VirtualFrame frame) {
var mapping = VmUtils.getObjectReceiver(frame);
var mapping = VmUtils.getOwner(frame);
var path = (String) VmUtils.getMemberKey(frame);
return importModule(mapping, path);
}

View File

@@ -33,7 +33,7 @@ public class ReadGlobMemberBodyNode extends ExpressionNode {
@Override
public Object executeGeneric(VirtualFrame frame) {
var mapping = VmUtils.getObjectReceiver(frame);
var mapping = VmUtils.getOwner(frame);
var path = (String) VmUtils.getMemberKey(frame);
return readResource(mapping, path);
}