示例#1
0
  public Type childExpectedType(Expr child, AscriptionVisitor av) {
    TypeSystem ts = av.typeSystem();

    if (child == cond) {
      return ts.Boolean();
    }

    return child.type();
  }
示例#2
0
  public Type childExpectedType(Expr child, AscriptionVisitor av) {
    TypeSystem ts = av.typeSystem();

    if (child == expr) {
      if (castType.type().isReference()) {
        return ts.Object();
      } else if (castType.type().isNumeric()) {
        return ts.Double();
      } else if (castType.type().isBoolean()) {
        return ts.Boolean();
      }
    }

    return child.type();
  }