You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nativeclassNative{staticfunctionprint(arg : string) : void;staticfunctionprint(arg : number) : void;}class_Main{staticfunctionmain(argv : string[]) : void{vara=[1,"hello",Native.print];// var a = [1, "hello", Native.print as (string) -> void]; is OK}}
Result:
$ jsx test.jsx
[test.jsx:10:12] Warning: unused variable a
var a = [1, "hello", Native.print];
^
/opt/local/lib/node_modules/jsx/bin/jsx:4346
throw new Error("[src/jsemitter.jsx:2046:98] detected invalid cast, value ^Error: [src/jsemitter.jsx:2046:98] detected invalid cast, value is not an instance of the designated type or null name = this._emitter.getNamer().getNameOfStaticFunction(classDef, name, (exprType as ResolvedFunctionType).getArgumentTypes()); ^^ at /opt/local/lib/node_modules/jsx/bin/jsx:4346:12 at Object._PropertyExpressionEmitter._emit$ (/opt/local/lib/node_modules/jsx/bin/jsx:4349:5) at /opt/local/lib/node_modules/jsx/bin/jsx:4158:9 at Object._ExpressionEmitter.emitWithPrecedence$NNF$V$ (/opt/local/lib/node_modules/jsx/bin/jsx:3537:3) at Object._OperatorExpressionEmitter.emit$N (/opt/local/lib/node_modules/jsx/bin/jsx:4157:7) at Object._ArrayLiteralExpressionEmitter.emit$N (/opt/local/lib/node_modules/jsx/bin/jsx:3667:65) at Object.JavaScriptEmitter._emitWithNullableGuard$LExpression$N (/opt/local/lib/node_modules/jsx/bin/jsx:12425:52) at Object.JavaScriptEmitter._emitRHSOfAssignment$LExpression$LType$ (/opt/local/lib/node_modules/jsx/bin/jsx:12488:8) at Object._AssignmentExpressionEmitter._emit$ (/opt/local/lib/node_modules/jsx/bin/jsx:4470:16) at /opt/local/lib/node_modules/jsx/bin/jsx:4158:9
The text was updated successfully, but these errors were encountered:
Source:
Result:
The text was updated successfully, but these errors were encountered: