{
"type": "Program",
"statements": [
{
"type": "ClassDeclaration",
"definition": {
"id": {
"type": "Identifier",
"name": "ETSGLOBAL",
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
"superClass": null,
"implements": [],
"body": [
{
"type": "MethodDefinition",
"key": {
"type": "Identifier",
"name": "main",
"loc": {
"start": {
"line": 1,
"column": 1,
"program": null
},
"end": {
"line": 1,
"column": 1,
"program": null
}
}
},
"kind": "method",
"accessibility": "public",
"static": true,
"optional": false,
"computed": false,
"value": {
"type": "FunctionExpression",
"function": {
"type": "ScriptFunction",
"id": {
"type": "Identifier",
"name": "main",
"loc": {
"start": {
"line": 1,
"column": 1,
"program": null
},
"end": {
"line": 1,
"column": 1,
"program": null
}
}
},
"generator": false,
"async": false,
"expression": false,
"params": [],
"body": {
"type": "BlockStatement",
"statements": [],
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
"overloads": [],
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
{
"type": "ClassProperty",
"key": {
"type": "Identifier",
"name": "v",
"loc": {
"start": {
"line": 16,
"column": 5,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 16,
"column": 6,
"program": "test_jsvalue_get_double.ets"
}
}
},
"accessibility": "public",
"static": true,
"readonly": false,
"declare": false,
"optional": false,
"computed": false,
"typeAnnotation": {
"type": "ETSTypeReference",
"part": {
"type": "ETSTypeReferencePart",
"name": {
"type": "Identifier",
"name": "JSValue",
"loc": {
"start": {
"line": 16,
"column": 8,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 16,
"column": 15,
"program": "test_jsvalue_get_double.ets"
}
}
},
"loc": {
"start": {
"line": 16,
"column": 8,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 16,
"column": 15,
"program": "test_jsvalue_get_double.ets"
}
}
},
"loc": {
"start": {
"line": 16,
"column": 8,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 16,
"column": 15,
"program": "test_jsvalue_get_double.ets"
}
}
},
"definite": false,
"loc": {
"start": {
"line": 16,
"column": 5,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 16,
"column": 6,
"program": "test_jsvalue_get_double.ets"
}
}
},
{
"type": "ClassProperty",
"key": {
"type": "Identifier",
"name": "num_v",
"loc": {
"start": {
"line": 17,
"column": 5,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 17,
"column": 10,
"program": "test_jsvalue_get_double.ets"
}
}
},
"accessibility": "public",
"static": true,
"readonly": false,
"declare": false,
"optional": false,
"computed": false,
"typeAnnotation": {
"type": "ETSPrimitiveType",
"loc": {
"start": {
"line": 17,
"column": 12,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 17,
"column": 18,
"program": "test_jsvalue_get_double.ets"
}
}
},
"definite": false,
"loc": {
"start": {
"line": 17,
"column": 5,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 17,
"column": 21,
"program": "test_jsvalue_get_double.ets"
}
}
}
],
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
},
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
}
],
"loc": {
"start": {
"line": 1,
"column": 1,
"program": "test_jsvalue_get_double.ets"
},
"end": {
"line": 18,
"column": 1,
"program": "test_jsvalue_get_double.ets"
}
}
}
[test_jsvalue_get_double.ets:17:21] Semantic error ESE0318: Type 'JSValue' cannot be assigned to type 'Double'