Skip to content

Commit 23253fc

Browse files
committed
Sync nqp-jvm-prep P6opaque fix.
1 parent 1a01251 commit 23253fc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ public final SixModelObject autoViv(int slot) {
3232

3333
public SixModelObject clone(ThreadContext tc) {
3434
try {
35+
SixModelObject cloned;
3536
if (this.delegate != null)
36-
return this.delegate.clone(tc);
37+
cloned = this.delegate.clone(tc);
3738
else
38-
return (SixModelObject)this.clone();
39+
cloned = (SixModelObject)this.clone();
40+
cloned.sc = null;
41+
return cloned;
3942
} catch (CloneNotSupportedException e) {
4043
throw new RuntimeException(e);
4144
}

0 commit comments

Comments
 (0)