You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/pa2-tests/core/bad_class_init_override.py....

111 lines
2.7 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 7, 5 ],
"declarations" : [ {
"kind" : "ClassDef",
"location" : [ 1, 1, 7, 0 ],
"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, 13 ],
"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" : "IntegerLiteral",
"location" : [ 2, 13, 2, 13 ],
"value" : 1
}
}, {
"kind" : "FuncDef",
"location" : [ 4, 5, 5, 13 ],
"name" : {
"kind" : "Identifier",
"location" : [ 4, 9, 4, 16 ],
"errorMsg" : "Method overridden with different type signature: __init__",
"name" : "__init__"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 4, 18, 4, 25 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 4, 18, 4, 21 ],
"name" : "self"
},
"type" : {
"kind" : "ClassType",
"location" : [ 4, 23, 4, 25 ],
"className" : "A"
}
}, {
"kind" : "TypedVar",
"location" : [ 4, 28, 4, 32 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 4, 28, 4, 28 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 4, 30, 4, 32 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 4, 34, 4, 34 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ ]
} ]
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 7, 1, 7, 4 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 7, 1, 7, 4 ],
"function" : {
"kind" : "Identifier",
"location" : [ 7, 1, 7, 1 ],
"name" : "A"
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 7, 3, 7, 3 ],
"value" : 1
} ]
}
} ],
"errors" : {
"errors" : [ {
"kind" : "CompilerError",
"location" : [ 4, 9, 4, 16 ],
"message" : "Method overridden with different type signature: __init__"
} ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}