{ "kind" : "Program", "location" : [ 1, 1, 8, 13 ], "declarations" : [ { "kind" : "VarDef", "location" : [ 1, 1, 1, 9 ], "var" : { "kind" : "TypedVar", "location" : [ 1, 1, 1, 5 ], "identifier" : { "kind" : "Identifier", "location" : [ 1, 1, 1, 1 ], "name" : "x" }, "type" : { "kind" : "ClassType", "location" : [ 1, 3, 1, 5 ], "className" : "int" } }, "value" : { "kind" : "IntegerLiteral", "location" : [ 1, 9, 1, 9 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "value" : 1 } }, { "kind" : "VarDef", "location" : [ 2, 1, 2, 13 ], "var" : { "kind" : "TypedVar", "location" : [ 2, 1, 2, 6 ], "identifier" : { "kind" : "Identifier", "location" : [ 2, 1, 2, 1 ], "name" : "y" }, "type" : { "kind" : "ClassType", "location" : [ 2, 3, 2, 6 ], "className" : "bool" } }, "value" : { "kind" : "BooleanLiteral", "location" : [ 2, 10, 2, 13 ], "inferredType" : { "kind" : "ClassValueType", "className" : "bool" }, "value" : true } } ], "statements" : [ { "kind" : "AssignStmt", "location" : [ 4, 1, 4, 9 ], "errorMsg" : "Expected type `int`; got type `bool`", "targets" : [ { "kind" : "Identifier", "location" : [ 4, 1, 4, 1 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "name" : "x" } ], "value" : { "kind" : "BooleanLiteral", "location" : [ 4, 5, 4, 9 ], "inferredType" : { "kind" : "ClassValueType", "className" : "bool" }, "value" : false } }, { "kind" : "AssignStmt", "location" : [ 5, 1, 5, 5 ], "errorMsg" : "Expected type `bool`; got type `int`", "targets" : [ { "kind" : "Identifier", "location" : [ 5, 1, 5, 1 ], "inferredType" : { "kind" : "ClassValueType", "className" : "bool" }, "name" : "y" } ], "value" : { "kind" : "IntegerLiteral", "location" : [ 5, 5, 5, 5 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "value" : 2 } }, { "kind" : "AssignStmt", "location" : [ 6, 1, 6, 5 ], "targets" : [ { "kind" : "Identifier", "location" : [ 6, 1, 6, 1 ], "errorMsg" : "Not a variable: z", "inferredType" : { "kind" : "ClassValueType", "className" : "object" }, "name" : "z" } ], "value" : { "kind" : "IntegerLiteral", "location" : [ 6, 5, 6, 5 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "value" : 3 } }, { "kind" : "AssignStmt", "location" : [ 7, 1, 7, 9 ], "targets" : [ { "kind" : "Identifier", "location" : [ 7, 1, 7, 1 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "name" : "x" }, { "kind" : "Identifier", "location" : [ 7, 5, 7, 5 ], "errorMsg" : "Not a variable: z", "inferredType" : { "kind" : "ClassValueType", "className" : "object" }, "name" : "z" } ], "value" : { "kind" : "IntegerLiteral", "location" : [ 7, 9, 7, 9 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "value" : 4 } }, { "kind" : "AssignStmt", "location" : [ 8, 1, 8, 12 ], "errorMsg" : "Expected type `int`; got type ``", "targets" : [ { "kind" : "Identifier", "location" : [ 8, 1, 8, 1 ], "inferredType" : { "kind" : "ClassValueType", "className" : "int" }, "name" : "x" }, { "kind" : "Identifier", "location" : [ 8, 5, 8, 5 ], "errorMsg" : "Not a variable: z", "inferredType" : { "kind" : "ClassValueType", "className" : "object" }, "name" : "z" } ], "value" : { "kind" : "NoneLiteral", "location" : [ 8, 9, 8, 12 ], "inferredType" : { "kind" : "ClassValueType", "className" : "" } } } ], "errors" : { "errors" : [ { "kind" : "CompilerError", "location" : [ 4, 1, 4, 9 ], "message" : "Expected type `int`; got type `bool`" }, { "kind" : "CompilerError", "location" : [ 5, 1, 5, 5 ], "message" : "Expected type `bool`; got type `int`" }, { "kind" : "CompilerError", "location" : [ 6, 1, 6, 1 ], "message" : "Not a variable: z" }, { "kind" : "CompilerError", "location" : [ 7, 5, 7, 5 ], "message" : "Not a variable: z" }, { "kind" : "CompilerError", "location" : [ 8, 1, 8, 12 ], "message" : "Expected type `int`; got type ``" }, { "kind" : "CompilerError", "location" : [ 8, 5, 8, 5 ], "message" : "Not a variable: z" } ], "kind" : "Errors", "location" : [ 0, 0, 0, 0 ] } }