+2006-08-13 Marek Safar <marek.safar@seznam.cz>
+
+ A fix for #79056
+ * cs-parser.jay: Don't destroy current array type by typeof of array's.
+
2006-08-12 Marek Safar <marek.safar@seznam.cz>
* cs-parser.jay: Check whether a constraint clause has already been
/// Hack to help create non-typed array initializer
/// </summary>
public static Expression current_array_type;
+ Expression pushed_current_array_type;
/// <summary>
/// Used to determine if we are parsing the get/set pair
}
;
-void_pointer_expression
- : void_pointer_expression STAR
- {
- $$ = new ComposedCast ((Expression) $1, "*", lexer.Location);
- }
- | VOID STAR
- {
- $$ = new ComposedCast (TypeManager.system_void_expr, "*", lexer.Location);;
- }
- ;
-
typeof_expression
- : TYPEOF OPEN_PARENS VOID CLOSE_PARENS
- {
- $$ = new TypeOfVoid ((Location) $1);
- }
- | TYPEOF OPEN_PARENS void_pointer_expression CLOSE_PARENS
- {
- $$ = new TypeOf ((Expression) $3, (Location) $1);
+ : TYPEOF
+ {
+ pushed_current_array_type = current_array_type;
+ lexer.TypeOfParsing = true;
}
- | TYPEOF OPEN_PARENS
+ OPEN_PARENS type CLOSE_PARENS
{
- lexer.TypeOfParsing = true;
- }
- type CLOSE_PARENS
- {
- lexer.TypeOfParsing = false;
- $$ = new TypeOf ((Expression) $4, lexer.Location);
+ lexer.TypeOfParsing = false;
+ Expression type = (Expression)$4;
+ if (type == TypeManager.system_void_expr)
+ $$ = new TypeOfVoid ((Location) $1);
+ else
+ $$ = new TypeOf (type, (Location) $1);
+ current_array_type = pushed_current_array_type;
}
;
+2006-08-13 Marek Safar <marek.safar@seznam.cz>
+
+ A fix for #79056
+ * cs-parser.jay: Don't destroy current array type by typeof of array's.
+
2006-08-12 Marek Safar <marek.safar@seznam.cz>
* class.cs (Method.Define): Issue a warning when generic method looks like
/// Hack to help create non-typed array initializer
/// </summary>
public static Expression current_array_type;
+ Expression pushed_current_array_type;
/// <summary>
/// Used to determine if we are parsing the get/set pair
;
typeof_expression
- : TYPEOF OPEN_PARENS VOID CLOSE_PARENS
- {
- $$ = new TypeOfVoid ((Location) $1);
+ : TYPEOF
+ {
+ pushed_current_array_type = current_array_type;
}
- | TYPEOF OPEN_PARENS type CLOSE_PARENS
+ OPEN_PARENS type CLOSE_PARENS
{
- $$ = new TypeOf ((Expression) $3, (Location) $1);
+ Expression type = (Expression)$4;
+ if (type == TypeManager.system_void_expr)
+ $$ = new TypeOfVoid ((Location) $1);
+ else
+ $$ = new TypeOf (type, (Location) $1);
+ current_array_type = pushed_current_array_type;
}
;
--- /dev/null
+using System;\r
+\r
+namespace MicroFocus.MONO.Bugs\r
+{\r
+ public class Odd\r
+ {\r
+ private static readonly Type[] _argTypes = { typeof(object[]) };\r
+\r
+ public static void Main()\r
+ {\r
+ }\r
+ }\r
+}
\ No newline at end of file