public static void Error_AttributeNotValidForElement (Attribute a, Location loc)
{
Report.Error (
- 592, loc, "Attribute '" + a.Name +
+ 30662, loc, "Attribute '" + a.Name +
"' is not valid on this declaration type. " +
"It is valid on " + a.GetValidTargets () + "declarations only.");
}
public static bool CheckAttribute (Attribute a, object element)
{
- TypeContainer attr = TypeManager.LookupClass (a.Type);
+ //TypeContainer attr = TypeManager.LookupClass (a.Type);
AttributeTargets targets = a.GetAttributeUsage ().ValidOn;
}
//
- // This method should be invoked to pull the IndexerName attribute from an
+ // This method should be invoked to pull the DefaultPropName attribute from an
// Indexer if it exists.
//
public static string ScanForIndexerName (EmitContext ec, Attributes opt_attrs)
continue;
//
- // So we have found an IndexerName, pull the data out.
+ // So we have found an DefaultPropName, pull the data out.
//
if (a.Arguments == null || a.Arguments [0] == null){
Error_AttributeConstructorMismatch (a.Location);
AttributeUsageAttribute usage_attr = GetAttributeUsage ();
if ((usage_attr.ValidOn & ias.AttributeTargets) == 0) {
- Report.Error (592, Location, "Attribute" + Name + "is not valid on this declaration type. It is valid on " + GetValidTargets () + " declarations only.");
+ Report.Error (30662, Location, "Attribute" + Name + "is not valid on this declaration type. It is valid on " + GetValidTargets () + " declarations only.");
return;
}
CallingConvention cc = CallingConvention.Winapi;
CharSet charset = CharSet.Ansi;
bool preserve_sig = true;
- bool exact_spelling = false;
- bool set_last_err = false;
+ /*bool exact_spelling = false;
+ bool set_last_err = false;*/
string entry_point = null;
for (int i = 0; i < named_args.Count; i++) {
charset = (CharSet) c.GetValue ();
else if (member_name == "EntryPoint")
entry_point = (string) c.GetValue ();
- else if (member_name == "SetLastError")
+ /*else if (member_name == "SetLastError")
set_last_err = (bool) c.GetValue ();
else if (member_name == "ExactSpelling")
- exact_spelling = (bool) c.GetValue ();
+ exact_spelling = (bool) c.GetValue ();*/
else if (member_name == "PreserveSig")
preserve_sig = (bool) c.GetValue ();
} else {