Skip to content

Commit 46d2162

Browse files
author
Tadeusz Sośnierz
committed
Make nqp::accept() less wrong, and thus make it actually work
1 parent 0a65414 commit 46d2162

File tree

1 file changed

+2
-1
lines changed
  • src/vm/jvm/runtime/org/perl6/nqp/runtime

1 file changed

+2
-1
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ public static SixModelObject accept(SixModelObject obj, ThreadContext tc) {
391391
IOHandleInstance h = (IOHandleInstance)obj;
392392
NotQuiteSocket sock = (NotQuiteSocket)h.handle;
393393
NotQuiteSocket newsock = sock.accept(tc);
394-
IOHandleInstance ret = new IOHandleInstance();
394+
SixModelObject IOType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.ioType;
395+
IOHandleInstance ret = (IOHandleInstance)IOType.st.REPR.allocate(tc, IOType.st);
395396
ret.handle = newsock;
396397
return (SixModelObject)ret;
397398
}

0 commit comments

Comments
 (0)