-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
Diagnose code that caused the verification failure of System.ServiceModel.Routing.dll svn path=/trunk/mcs/; revision=152858
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// CS1540: Cannot access protected member `A.this[int]' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it | ||
// Line: 14 | ||
|
||
class A { | ||
protected int this [int i] { get { return i; } } | ||
} | ||
|
||
class B : A { } | ||
|
||
class C : A { | ||
static int Main () | ||
{ | ||
B b = new B (); | ||
return b [0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters