* expression.cs: Apply patch from Ben: Remove dead code from
ArrayCreation, and remove the TurnintoConstant call in const.cs,
as that code just threw an exception anwyays.
* const.cs: Remove the call to the turnintoconstant, for details
see bug: #63144
svn path=/trunk/mcs/; revision=33531
Expr = ch_expr.Expr;
else if ((ec_expr != null) && (ec_expr.Child is Constant))
Expr = ec_expr.Child;
- else if (Expr is ArrayCreation) {
- ArrayCreation ac = (ArrayCreation) Expr;
-
- Expr = ac.TurnIntoConstant ();
- if (Expr == null){
- Report.Error (150, Location, "A constant value is expected");
- value = null;
- return false;
- }
- } else {
+ else {
if (errors == Report.Errors)
Report.Error (150, Location, "A constant value is expected");
value = null;
}
return ret;
}
-
- public Expression TurnIntoConstant ()
- {
- //
- // Should use something like the above attribute thing.
- // It should return a subclass of Constant that just returns
- // the computed value of the array
- //
- throw new Exception ("Does not support yet Turning array into a Constant");
- }
}
/// <summary>