CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      07/05/30 09:49:16

Modified files:
        .              : ChangeLog 
        cscc/csharp    : cs_lookup.c 

Log message:
        Fix the ambiguous error when resolving a type in more than one using 
namespace
        declaration.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3462&r2=1.3463
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_lookup.c?cvsroot=dotgnu-pnet&r1=1.34&r2=1.35

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3462
retrieving revision 1.3463
diff -u -b -r1.3462 -r1.3463
--- ChangeLog   29 May 2007 05:26:06 -0000      1.3462
+++ ChangeLog   30 May 2007 09:49:16 -0000      1.3463
@@ -1,3 +1,8 @@
+2007-05-30  Klaus Treichel  <[EMAIL PROTECTED]>
+
+       * cscc/csharp/cs_lookup.c: Fix the ambiguous error if a type is 
resolved in
+       more than one of the using namespace declarations.
+
 2007-05-29  Klaus Treichel  <[EMAIL PROTECTED]>
 
        * cscc/csharp/cs_semvalue.h: Change the semantic value for a namespace 
so

Index: cscc/csharp/cs_lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lookup.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- cscc/csharp/cs_lookup.c     29 May 2007 05:26:07 -0000      1.34
+++ cscc/csharp/cs_lookup.c     30 May 2007 09:49:16 -0000      1.35
@@ -1413,6 +1413,7 @@
                                                                "the alias `%s' 
does not refere to a type or namespace.",
                                                                
ILQualIdentName(alias, 0));
                                                }
+                                               FreeMembers(&results);
                                                return CSSemValueDefault;
                                        }
                                }
@@ -1431,6 +1432,17 @@
                        using = using->next;
                }
 
+               if(results.num > 1)
+               {
+                       if(reportErrors)
+                       {
+                               /* The result is ambiguous */
+                               AmbiguousError(node, name, &results);
+                       }
+                       FreeMembers(&results);
+                       return CSSemValueDefault;
+               }
+
                /* Move up to the enclosing namespace */
                namespace = namespace->enclosing;
        }


_______________________________________________
dotgnu-pnet-commits mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/dotgnu-pnet-commits

Reply via email to