コード例 #1
0
ファイル: SumFunExpr.java プロジェクト: dlitz/resin
  /** Returns the expr type. */
  public AmberType getType() {
    // int/Integer -> Long and float/Float -> Double
    AmberType argType = _arg.getType();

    if ((argType instanceof IntegerType) || (argType instanceof PrimitiveIntType))
      return LongType.create();

    if ((argType instanceof FloatType) || (argType instanceof PrimitiveFloatType))
      return DoubleType.create();

    return argType;
  }