Hi. I just spent some time tracking down an error at run time, that it seems to me could have been caught at compile time. I was using std.net.Socket with a JavaScript target and got a run time reference error. Because the code passed through the compiler fine, I thought it couldn’t be that Socket isn’t supported with JavaScript is the platform. But it seems that that was exactly the problem. Is there a reason that the code compiles without error?
Here is the code
package ;
import sys.net.Socket;
class Main
{
private var socket : Socket ;
function new()
{
socket = new Socket() ;
}
static public function main()
{
var main = new Main();
}
}