[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.30,1.31
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.30,1.31 |
Date: |
Thu, 12 Dec 2002 14:32:57 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv25269/cscc/csharp
Modified Files:
cs_gather.c
Log Message:
Bug #1968 -- check access modifiers for overriden methods
Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** cs_gather.c 8 Dec 2002 01:59:27 -0000 1.30
--- cs_gather.c 12 Dec 2002 19:32:55 -0000 1.31
***************
*** 857,860 ****
--- 857,861 ----
ILClass *interface;
ILMember *interfaceMember;
+ ILClass *class1, *class2;
/* Get the name of the method, and the interface member (if any) */
***************
*** 1100,1103 ****
--- 1101,1125 ----
"declaration of `%s' overrides
an inherited member, "
"and `override' was not
present", name);
+ }
+ if((method->modifiers &
CS_SPECIALATTR_OVERRIDE) !=0
+ && (method->modifiers &
IL_META_METHODDEF_MEMBER_ACCESS_MASK)
+ != (ILMember_Attrs(member) &
+
IL_META_METHODDEF_MEMBER_ACCESS_MASK))
+ {
+ class1=ILMember_Owner(member);
+ class2=ILMethod_Owner(methodInfo);
+ CCErrorOnLine(yygetfilename(method),
yygetlinenum(method),
+ "cannot change the access
modifiers while overriding "
+ "virtual method '%s%s%s::%s'
with '%s%s%s::%s' ",
+ ILClass_Namespace(class1) ?
+ ILClass_Namespace(class1) : "" ,
+ ILClass_Namespace(class1) ? "."
: "",
+ ILClass_Name(class1),
+ name,
+ ILClass_Namespace(class2) ?
+ ILClass_Namespace(class2) : "" ,
+ ILClass_Namespace(class2) ? "."
: "",
+ ILClass_Name(class2),
+ name);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.30,1.31,
Gopal.V <address@hidden> <=