+2004-05-25 Jackson Harper <jackson@ximian.com>
+
+ * ILParser.jay: Fix casting for data type constants.
+
2004-05-22 Jackson Harper <jackson@ximian.com>
* ILParser.jay: [,] is short form for [...,...] this fixes bug
if ($2 != null) {\r
field_def.SetOffset ((uint) $2);\r
}\r
- \r
+\r
if ($6 != null) {\r
field_def.AddDataValue ((string) $6);\r
}\r
- \r
+\r
if ($7 != null) {\r
field_def.SetValue ((Constant) $7);\r
}\r
}\r
| K_FLOAT32 OPEN_PARENS float64 CLOSE_PARENS repeat_opt\r
{\r
- FloatConst float_const = new FloatConst ((float) $3);\r
+ double d = (double) $3;\r
+ FloatConst float_const = new FloatConst ((float) d);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (float_const, (int) $5);\r
}\r
| K_INT16 OPEN_PARENS int32 CLOSE_PARENS repeat_opt\r
{\r
- IntConst int_const = new IntConst ((short) $3);\r
+ int i = (int) $3;\r
+ IntConst int_const = new IntConst ((short) i);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (int_const, (int) $5);\r
}\r
| K_INT8 OPEN_PARENS int32 CLOSE_PARENS repeat_opt\r
{\r
- IntConst int_const = new IntConst ((sbyte) $3);\r
+ int i = (int) $3;\r
+ IntConst int_const = new IntConst ((sbyte) i);\r
\r
if ($5 != null)\r
$$ = new RepeatedConstant (int_const, (int) $5);\r