From: Miguel de Icaza Date: Fri, 20 Sep 2002 20:58:19 +0000 (-0000) Subject: Provide location informtaion X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8e90ead2207b76f0e41b29d5594dd559ded82532;p=mono.git Provide location informtaion svn path=/trunk/mcs/; revision=7658 --- diff --git a/mcs/mcs/decl.cs b/mcs/mcs/decl.cs index 72487ac5e60..83de6262d03 100755 --- a/mcs/mcs/decl.cs +++ b/mcs/mcs/decl.cs @@ -447,7 +447,7 @@ namespace Mono.CSharp { t = parent.DefineType (); if (t == null){ - Report.Error (146, "Class definition is circular: `"+name+"'"); + Report.Error (146, Location, "Class definition is circular: `"+name+"'"); error = true; return null; } @@ -548,7 +548,7 @@ namespace Mono.CSharp { if (match != null){ if (t != null){ - Report.Error (104, "`" + name + "' is an ambiguous reference"); + Report.Error (104, Location, "`" + name + "' is an ambiguous reference"); return null; } diff --git a/mcs/mcs/rootcontext.cs b/mcs/mcs/rootcontext.cs index 09b74280f2e..7c2995fc39f 100755 --- a/mcs/mcs/rootcontext.cs +++ b/mcs/mcs/rootcontext.cs @@ -440,7 +440,7 @@ namespace Mono.CSharp { return ns.Substring (0, i); } - static Type NamespaceLookup (Namespace curr_ns, string name) + static Type NamespaceLookup (Namespace curr_ns, string name, Location loc) { Type t; @@ -497,7 +497,7 @@ namespace Mono.CSharp { match = TypeManager.LookupType (MakeFQN (ue.Name, name)); if (match != null){ if (t != null){ - Report.Error (104, "`" + name + "' is an ambiguous reference"); + Report.Error (104, loc, "`" + name + "' is an ambiguous reference"); return null; } @@ -567,7 +567,7 @@ namespace Mono.CSharp { containing_ds = containing_ds.Parent; } - t = NamespaceLookup (ds.Namespace, name); + t = NamespaceLookup (ds.Namespace, name, loc); if (t != null){ ds.Cache [name] = t; return t;