: type
{
if ($1 is ComposedCast) {
- if (lexer.ConstraintsParsing)
- Report.Error (706, GetLocation ($1), "Invalid constraint type `{0}'", ((ComposedCast)$1).GetSignatureForError ());
- else
- Report.Error (1521, GetLocation ($1), "Invalid base type `{0}'", ((ComposedCast)$1).GetSignatureForError ());
+ Report.Error (1521, GetLocation ($1), "Invalid base type `{0}'", ((ComposedCast)$1).GetSignatureForError ());
}
$$ = $1;
}
;
type_parameter_constraint
- : base_type_name
+ : type
{
+ if ($1 is ComposedCast)
+ Report.Error (706, GetLocation ($1), "Invalid constraint type `{0}'", ((ComposedCast)$1).GetSignatureForError ());
+
$$ = $1;
}
| NEW OPEN_PARENS CLOSE_PARENS