dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lookup.c,1.24,1.25


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lookup.c,1.24,1.25
Date: Thu, 01 May 2003 18:57:19 -0400

Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv2611/cscc/csharp

Modified Files:
        cs_lookup.c 
Log Message:


FindIndexers: ignore private interface implementations on the first
scan through a class, to allow a non-interface indexer to override
the interface one.


Index: cs_lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lookup.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** cs_lookup.c 27 Feb 2003 03:21:24 -0000      1.24
--- cs_lookup.c 1 May 2003 22:57:17 -0000       1.25
***************
*** 713,716 ****
--- 713,730 ----
                                        continue;
                                }
+                               if(ILOverrideFromMethod(method) != 0)
+                               {
+                                       /* Ignore private interface overrides 
for now, so that
+                                          we can pick up a non-interface 
indexer instead if
+                                          one exists.  If one doesn't exist, 
then we will
+                                          re-find the interface indexer when 
we scan the
+                                          base interfaces below.  This 
situation occurs with
+                                          code like this:
+ 
+                                               X this[int i] { ... }
+                                                       X I.this[int i] { ... }
+                                       */
+                                       continue;
+                               }
                                AddMember(results, (ILProgramItem *)member, 
info,
                                                  IL_META_MEMBERKIND_PROPERTY);
***************
*** 718,730 ****
                }
  
!               /* If this is an interface, then scan its base interfaces */
!               if(ILClass_IsInterface(info))
                {
!                       impl = 0;
!                       while((impl = ILClassNextImplements(info, impl)) != 0)
!                       {
!                               FindIndexers(ILImplementsGetInterface(impl),
!                                                    accessedFrom, results);
!                       }
                }
  
--- 732,742 ----
                }
  
!               /* Scan the base interfaces.  Duplicate entries will be cleaned
!                  up by the TrimMemberList call in "IndexerLookup" */
!               impl = 0;
!               while((impl = ILClassNextImplements(info, impl)) != 0)
                {
!                       FindIndexers(ILImplementsGetInterface(impl),
!                                            accessedFrom, results);
                }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]