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

Method typeCheckForAssign

src/chap14/TypeChecker.java:39–52  ·  view source on GitHub ↗
(TypeEnv tenv, TypeInfo valueType)

Source from the content-addressed store, hash-verified

37 return type;
38 }
39 public TypeInfo typeCheckForAssign(TypeEnv tenv, TypeInfo valueType)
40 throws TypeException
41 {
42 type = tenv.get(nest, index);
43 if (type == null) {
44 type = valueType;
45 tenv.put(0, index, valueType);
46 return valueType;
47 }
48 else {
49 valueType.assertSubtypeOf(type, tenv, this);
50 return type;
51 }
52 }
53 }
54 @Reviser public static class NegativeEx extends NegativeExpr {
55 public NegativeEx(List<ASTree> c) { super(c); }

Callers 1

typeCheckForAssignMethod · 0.45

Calls 3

getMethod · 0.65
putMethod · 0.65
assertSubtypeOfMethod · 0.45

Tested by

no test coverage detected