return s;
}
+ /* Lets caller pass in their own Socket object. */
+ public void accept(Socket s) {
+ int newfd=nativeaccept(s);
+ s.setFD(newfd);
+ }
+
private native int nativeaccept(Socket s);
public void close();
throw new Error("Illegal return appears in Task: "+d.getSymbol());
MethodDescriptor md=(MethodDescriptor)d;
if (rn.getReturnExpression()!=null)
- checkExpressionNode(md, nametable, rn.getReturnExpression(), md.getReturnType());
+ if (md.getReturnType().isVoid())
+ throw new Error(md+" is void");
+ else
+ checkExpressionNode(md, nametable, rn.getReturnExpression(), md.getReturnType());
else
if (md.getReturnType()!=null&&!md.getReturnType().isVoid())
throw new Error("Need to return something for "+md);