Report.Error (-6, loc,\r
"Could not find a constructor for this argument list.");\r
}\r
+\r
+ static void Error_TypeParameterInAttribute (Location loc)\r
+ {\r
+ Report.Error (\r
+ -202, loc, "Can not use a type parameter in an attribute");\r
+ }\r
\r
private Type CheckAttributeType (EmitContext ec) {\r
Type t;\r
}\r
\r
e = a.Expr;\r
+ if (e is TypeParameterExpr){\r
+ Error_TypeParameterInAttribute (Location);\r
+ return null;\r
+ }\r
+ \r
if (member is PropertyExpr) {\r
PropertyExpr pe = (PropertyExpr) member;\r
PropertyInfo pi = pe.PropertyInfo;\r
foreach (Attribute a in asec.Attributes){\r
if (a.ResolveType (ec) == null)\r
return null;\r
- \r
+\r
if (a.Type != TypeManager.indexer_name_type)\r
continue;\r
\r