MCPcopy Create free account
hub / github.com/chibash/stone / typeCheck

Method typeCheck

src/chap14/TypeChecker.java:56–60  ·  view source on GitHub ↗
(TypeEnv tenv)

Source from the content-addressed store, hash-verified

54 @Reviser public static class NegativeEx extends NegativeExpr {
55 public NegativeEx(List<ASTree> c) { super(c); }
56 public TypeInfo typeCheck(TypeEnv tenv) throws TypeException {
57 TypeInfo t = ((ASTreeTypeEx)operand()).typeCheck(tenv);
58 t.assertSubtypeOf(TypeInfo.INT, tenv, this);
59 return TypeInfo.INT;
60 }
61 }
62 @Reviser public static class BinaryEx extends BinaryExpr {
63 protected TypeInfo leftType, rightType;

Callers

nothing calls this directly

Calls 3

assertSubtypeOfMethod · 0.95
typeCheckMethod · 0.45
operandMethod · 0.45

Tested by

no test coverage detected