[mcs] Improve error reporting from 51137702c64076f6f7af9a08c1bafc766f5cf6d2
authorMarek Safar <marek.safar@gmail.com>
Mon, 12 Oct 2015 14:16:45 +0000 (16:16 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 12 Oct 2015 14:17:22 +0000 (16:17 +0200)
mcs/errors/cs9671.cs [new file with mode: 0644]
mcs/errors/cs9871.cs [deleted file]
mcs/mcs/cs-parser.jay

diff --git a/mcs/errors/cs9671.cs b/mcs/errors/cs9671.cs
new file mode 100644 (file)
index 0000000..d89b214
--- /dev/null
@@ -0,0 +1,8 @@
+// CS9671: Global attributes must have attribute target specified
+// Line: 8
+
+using System.Reflection;
+
+[assembly: AssemblyTitle ("SidePanels")]
+
+[UsesLibrary ("eaclibrary", Required=true)]
diff --git a/mcs/errors/cs9871.cs b/mcs/errors/cs9871.cs
deleted file mode 100644 (file)
index a41fcff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// CS9871: Global attributes must have attribute target specified
-// Line: 8
-
-using System.Reflection;
-
-[assembly: AssemblyTitle ("SidePanels")]
-
-[UsesLibrary ("eaclibrary", Required=true)]
index d09ae4dd8507e6b1f572e0e816fadc163b812e39..fb6a3e87873597f165ac3c175682518293449355 100644 (file)
@@ -400,14 +400,14 @@ outer_declaration
          }
        | opt_extern_alias_directives opt_using_directives attribute_sections
          {
-
                Attributes attrs = (Attributes) $3;
                if (attrs != null) {
                        foreach (var a in attrs.Attrs) {
                                if (a.ExplicitTarget == "assembly" || a.ExplicitTarget == "module")
                                        continue;
 
-                               report.Error (-1671, a.Location, "Global attributes must have attribute target specified");
+                               if (a.ExplicitTarget == null)
+                                       report.Error (-1671, a.Location, "Global attributes must have attribute target specified");
                        }
                }