Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make P6opaque clone actually work.
  • Loading branch information
jnthn committed Feb 1, 2013
1 parent ea04fec commit 9b42430
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java
@@ -1,4 +1,5 @@
package org.perl6.nqp.sixmodel.reprs;
import org.perl6.nqp.runtime.ThreadContext;
import org.perl6.nqp.sixmodel.SixModelObject;
import org.perl6.nqp.sixmodel.TypeObject;

Expand Down Expand Up @@ -28,6 +29,14 @@ public final SixModelObject autoViv(int slot) {
return av;
throw new RuntimeException("Cloning auto-viv container NYI");
}

public SixModelObject clone(ThreadContext tc) {
try {
return (SixModelObject)this.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}

public void badNative() {
throw new RuntimeException("Cannot access a reference attribute as a native attribute");
Expand Down

0 comments on commit 9b42430

Please sign in to comment.