(TypeEnv tenv)
| 203 | protected TypeInfo varType, valueType; |
| 204 | public VarStmntEx2(List<ASTree> c) { super(c); } |
| 205 | public TypeInfo typeCheck(TypeEnv tenv) throws TypeException { |
| 206 | if (tenv.get(0, index) != null) |
| 207 | throw new TypeException("duplicate variable: " + name(), this); |
| 208 | varType = TypeInfo.get(type()); |
| 209 | tenv.put(0, index, varType); |
| 210 | valueType = ((ASTreeTypeEx)initializer()).typeCheck(tenv); |
| 211 | valueType.assertSubtypeOf(varType, tenv, this); |
| 212 | return varType; |
| 213 | } |
| 214 | } |
| 215 | } |
nothing calls this directly
no test coverage detected