2006-04-28 Marek Safar <marek.safar@seznam.cz>
authorMarek Safar <marek.safar@gmail.com>
Fri, 28 Apr 2006 20:49:17 +0000 (20:49 -0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 28 Apr 2006 20:49:17 +0000 (20:49 -0000)
A fix for #78049
*class.cs (Method.FindOutBaseMethod): Base method cannot be property method.

svn path=/trunk/mcs/; revision=60058

1  2 
mcs/errors/cs0109-8.cs
mcs/errors/cs0560.cs
mcs/errors/known-issues-gmcs
mcs/errors/known-issues-mcs
mcs/gmcs/ChangeLog
mcs/gmcs/class.cs
mcs/mcs/ChangeLog
mcs/mcs/class.cs
mcs/tests/test-502.cs

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8728d6f5d824ed8a1bb37170ceb714ae3e0df2e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,31 @@@
++// cs0109-8.cs: The member `DerivedClass.get_Value()' does not hide an inherited member. The new keyword is not required
++// Line: 14
++// Compiler options: -warnaserror -warn:4
++
++class BaseClass {
++        protected virtual int Value { 
++                get {
++                        return 0;
++                }
++                set { }
++        }
++}
++
++abstract class DerivedClass: BaseClass {
++        protected new int get_Value () {
++                return 1;
++        }
++}
++
++
++class ErrorClass: DerivedClass {
++        protected override int Value { 
++                get {
++                        return 0;
++                }
++                set { }
++        }
++
++              static void Main () {}
++}
++
diff --cc mcs/errors/cs0560.cs
index 37c23364baed253ffae88fd4d997a73c6942458b,37c23364baed253ffae88fd4d997a73c6942458b..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,30 -1,30 +1,0 @@@
--// cs0560.cs: Accessor 'ErrorClass.Value.get' : cannot override 'BaseClass.Value.get' because it is hidden by 'DerivedClass.get_Value()'
--// Line: 22
--
--class BaseClass {
--        protected virtual int Value { 
--                get {
--                        return 0;
--                }
--                set { }
--        }
--}
--
--abstract class DerivedClass: BaseClass {
--        protected new int get_Value () {
--                return 1;
--        }
--}
--
--
--class ErrorClass: DerivedClass {
--        protected override int Value { 
--                get {
--                        return 0;
--                }
--                set { }
--        }
--
--              static void Main () {}
--}
--
index 9ab755cc9a4311be16f633ac521976452f0500b8,9ab755cc9a4311be16f633ac521976452f0500b8..9d0baf7d010e4d49b570bf1c56e0a9cd039c34bf
@@@ -21,7 -21,7 +21,6 @@@ cs0547-2.cs # new in GMCS; grammar issu
  cs0547.cs
  cs0548-4.cs
  cs0548.cs
--cs0560.cs
  cs0567.cs
  cs0612-2.cs NO ERROR
  cs0619-42.cs
index b66a5ac32af7b367ae1225c95a25e9c702b550e7,b66a5ac32af7b367ae1225c95a25e9c702b550e7..170c3c9a5335cb28bf6c1cadb5373b5cabeb06a8
@@@ -19,7 -19,7 +19,6 @@@ cs0526.c
  cs0547.cs
  cs0548-4.cs
  cs0548.cs
--cs0560.cs
  cs0567.cs
  cs0612-2.cs NO ERROR
  cs0619-42.cs
index 0cbf7ca96fc52174812d409365493dab227d38c6,73685333a67d2e00a0ed396f9dd2abcc911409a2..d2debc4744cad9b95bf89dc622f70c2a1843982f
@@@ -1,31 -1,3 +1,36 @@@
++2006-04-28  Marek Safar  <marek.safar@seznam.cz>
++
++      A fix for #78049
++      *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
++
 +2006-04-28  Raja R Harinath  <harinath@gmail.com>
 +
 +      * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
 +      dummy UsageVector.
 +
 +      * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
 +      argument to two arguments: an usage-vector and a bool.  Move call
 +      to FlowBranching.Merge () ...
 +      (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
 +
 +      * flowanalysis.cs (UsageVector.MergeChild): Move special-case
 +      handling of loop and switch reachability to ...
 +      (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
 +
 +2006-04-27  Raja R Harinath  <harinath@gmail.com>
 +
 +      * flowanalysis.cs (FlowBranching.InLoop): Move special-case
 +      handling to FlowBranchingLoop.InLoop.
 +      (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
 +
 +2006-04-26  Marek Safar  <marek.safar@seznam.cz>
 +
 +      A fix for #78115
 +      anonymous.cs.cs (AnonymousMethod.DoResolve): Moved the check whether
 +      anonymous method  is allowed from AnonymousContainer here.
 +
 +      * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
 +
  2006-04-24  Raja R Harinath  <rharinath@novell.com>
  
        Fix #78156
index 24645f5ef8da0993824e553e6566cbfd143d50cf,24645f5ef8da0993824e553e6566cbfd143d50cf..4f307da7aeac102ec0abb2acf2f8328bbe31938e
@@@ -4169,6 -4169,6 +4169,9 @@@ namespace Mono.CSharp 
                        if (mi == null)
                                return null;
  
++                      if (mi.IsSpecialName)
++                              return null;
++
                        base_ret_type = mi.ReturnType;
                        return mi;
                }
index 7ea9ed572aae6fdb1434e0cf4c3de32a7703433c,2daf7721aac018c07a0898b5e13e2810b03f89e8..489fb2a73ce4660eeb8192041d75b4f2d55f7753
@@@ -1,31 -1,3 +1,36 @@@
++2006-04-28  Marek Safar  <marek.safar@seznam.cz>
++
++      A fix for #78049
++      *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
++
 +2006-04-28  Raja R Harinath  <harinath@gmail.com>
 +
 +      * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
 +      dummy UsageVector.
 +
 +      * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
 +      argument to two arguments: an usage-vector and a bool.  Move call
 +      to FlowBranching.Merge () ...
 +      (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
 +
 +      * flowanalysis.cs (UsageVector.MergeChild): Move special-case
 +      handling of loop and switch reachability to ...
 +      (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
 +
 +2006-04-27  Raja R Harinath  <harinath@gmail.com>
 +
 +      * flowanalysis.cs (FlowBranching.InLoop): Move special-case
 +      handling to FlowBranchingLoop.InLoop.
 +      (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
 +
 +2006-04-26  Marek Safar  <marek.safar@seznam.cz>
 +
 +      A fix for #78115
 +      anonymous.cs.cs (AnonymousMethod.DoResolve): Moved the check whether
 +      anonymous method  is allowed from AnonymousContainer here.
 +
 +      * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
 +
  2006-04-24  Raja R Harinath  <rharinath@novell.com>
  
        Fix #78156
index 71d1b70ff35ef58299eb5deff851117570534e99,71d1b70ff35ef58299eb5deff851117570534e99..85e7f953629cf56e5b9eccf848759989dd6804c7
@@@ -3931,6 -3931,6 +3931,9 @@@ namespace Mono.CSharp 
                        if (mi == null)
                                return null;
  
++                      if (mi.IsSpecialName)
++                              return null;
++
                        base_ret_type = mi.ReturnType;
                        return mi;
                }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d188b2f788cef93855e5e6f75651b437a8776945
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,10 @@@
++class Base\r
++{\r
++    public int Property { get { return 42; } }\r
++    static void Main () {}\r
++}\r
++\r
++class Derived : Base\r
++{\r
++    public int get_Property() { return 42; }\r
++}