Skip to content

Commit

Permalink
Ensure SC is cleared when cloning P6opaque.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 14, 2013
1 parent 9ceb63a commit 4c3618d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java
Expand Up @@ -32,10 +32,13 @@ public final SixModelObject autoViv(int slot) {

public SixModelObject clone(ThreadContext tc) {
try {
SixModelObject cloned;
if (this.delegate != null)
return this.delegate.clone(tc);
cloned = this.delegate.clone(tc);
else
return (SixModelObject)this.clone();
cloned = (SixModelObject)this.clone();
cloned.sc = null;
return cloned;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 4c3618d

Please sign in to comment.