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_gather.c,1.42,1.43


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.42,1.43
Date: Sat, 05 Jul 2003 00:06:12 -0400

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

Modified Files:
        cs_gather.c 
Log Message:


Search for the "virtual" method corresponding to an "override"
and report a bug if one isn't present (Bug #4196); property
signatures should never use the "hasthis" flag, as it is stored
on the underlying accessor methods instead.


Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** cs_gather.c 26 Jun 2003 23:55:50 -0000      1.42
--- cs_gather.c 5 Jul 2003 04:06:09 -0000       1.43
***************
*** 1172,1175 ****
--- 1172,1186 ----
            strncmp(ILMethod_Name(methodInfo), "set_", 4) != 0))
        {
+               /* If "override" is supplied, then look for its "virtual" */
+               if((method->modifiers & CS_SPECIALATTR_OVERRIDE) != 0)
+               {
+                       if(!ILMemberGetBase((ILMember *)methodInfo))
+                       {
+                               CCErrorOnLine(yygetfilename(method), 
yygetlinenum(method),
+                                                         "`override' used on a 
method with no "
+                                                         "corresponding 
`virtual'");
+                       }
+               }
+ 
                /* Look for duplicates and report on them */
                member = FindMemberBySignature(classInfo, name, signature,
***************
*** 1408,1415 ****
                CCOutOfMemory();
        }
-       if((property->modifiers & IL_META_METHODDEF_STATIC) == 0)
-       {
-               ILTypeSetCallConv(signature, IL_META_CALLCONV_HASTHIS);
-       }
  
        /* Create the parameters for the property */
--- 1419,1422 ----
***************
*** 1482,1485 ****
--- 1489,1503 ----
                                         name, (ILMember *)propertyInfo, 
property->name);
  
+       /* If "override" is supplied, then look for its "virtual" */
+       if((property->modifiers & CS_SPECIALATTR_OVERRIDE) != 0)
+       {
+               if(!ILMemberGetBase((ILMember *)propertyInfo))
+               {
+                       CCErrorOnLine(yygetfilename(property), 
yygetlinenum(property),
+                                                 "`override' used on a 
property with no "
+                                                 "corresponding `virtual'");
+               }
+       }
+ 
        /* Look for duplicates and report on them */
        member = FindMemberBySignature(classInfo, name, signature,
***************
*** 1633,1636 ****
--- 1651,1665 ----
        AddMemberToScope(info->currentScope, IL_SCOPE_EVENT,
                                         name, (ILMember *)eventInfo, 
eventName);
+ 
+       /* If "override" is supplied, then look for its "virtual" */
+       if((event->modifiers & CS_SPECIALATTR_OVERRIDE) != 0)
+       {
+               if(!ILMemberGetBase((ILMember *)eventInfo))
+               {
+                       CCErrorOnLine(yygetfilename(event), yygetlinenum(event),
+                                                 "`override' used on an event 
with no "
+                                                 "corresponding `virtual'");
+               }
+       }
  
        /* Report on the duplicates */





reply via email to

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