{ "kind" : "Program", "location" : [ 1, 1, 4, 4 ], "declarations" : [ { "kind" : "ClassDef", "location" : [ 1, 1, 2, 17 ], "name" : { "kind" : "Identifier", "location" : [ 1, 7, 1, 7 ], "name" : "A" }, "superClass" : { "kind" : "Identifier", "location" : [ 1, 9, 1, 14 ], "name" : "object" }, "declarations" : [ { "kind" : "VarDef", "location" : [ 2, 5, 2, 16 ], "errorMsg" : "Expected type `int`; got type `bool`", "var" : { "kind" : "TypedVar", "location" : [ 2, 5, 2, 9 ], "identifier" : { "kind" : "Identifier", "location" : [ 2, 5, 2, 5 ], "name" : "x" }, "type" : { "kind" : "ClassType", "location" : [ 2, 7, 2, 9 ], "className" : "int" } }, "value" : { "kind" : "BooleanLiteral", "location" : [ 2, 13, 2, 16 ], "inferredType" : { "kind" : "ClassValueType", "className" : "bool" }, "value" : true } } ] } ], "statements" : [ { "kind" : "ExprStmt", "location" : [ 4, 1, 4, 3 ], "expr" : { "kind" : "CallExpr", "location" : [ 4, 1, 4, 3 ], "inferredType" : { "kind" : "ClassValueType", "className" : "A" }, "function" : { "kind" : "Identifier", "location" : [ 4, 1, 4, 1 ], "name" : "A" }, "args" : [ ] } } ], "errors" : { "errors" : [ { "kind" : "CompilerError", "location" : [ 2, 5, 2, 16 ], "message" : "Expected type `int`; got type `bool`" } ], "kind" : "Errors", "location" : [ 0, 0, 0, 0 ] } }