diff options
author | Marek Safar <marek.safar@gmail.com> | 2018-04-08 23:54:05 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-04-09 20:37:23 +0300 |
commit | 07ae1445b87698b33ce73005f761b4b59e90602a (patch) | |
tree | b12b05f17436de5ca9aa0009c270a8c30804bedf /mcs/errors | |
parent | 2f3de804102869e0dc2f5053a80569f2b3f342a9 (diff) |
[mcs] Adds private protected modifier to the parser only
Diffstat (limited to 'mcs/errors')
-rw-r--r-- | mcs/errors/cs0273-2.cs | 9 | ||||
-rw-r--r-- | mcs/errors/cs1527-2.cs | 2 | ||||
-rw-r--r-- | mcs/errors/cs1527-3.cs | 2 | ||||
-rw-r--r-- | mcs/errors/cs1527.cs | 5 | ||||
-rw-r--r-- | mcs/errors/cs1644-62.cs | 10 |
5 files changed, 24 insertions, 4 deletions
diff --git a/mcs/errors/cs0273-2.cs b/mcs/errors/cs0273-2.cs new file mode 100644 index 00000000000..b0bdbef9e75 --- /dev/null +++ b/mcs/errors/cs0273-2.cs @@ -0,0 +1,9 @@ +// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2' +// Line: 7 +// Compiler options: -langversion:7.2 + + class C + { + private string S2 { get; private protected set; } + } + diff --git a/mcs/errors/cs1527-2.cs b/mcs/errors/cs1527-2.cs index d38945f3c89..0256ee2b354 100644 --- a/mcs/errors/cs1527-2.cs +++ b/mcs/errors/cs1527-2.cs @@ -1,4 +1,4 @@ -// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal +// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected // Line: 4 protected interface IFoo { diff --git a/mcs/errors/cs1527-3.cs b/mcs/errors/cs1527-3.cs index 763c75958ee..469d74cbb99 100644 --- a/mcs/errors/cs1527-3.cs +++ b/mcs/errors/cs1527-3.cs @@ -1,4 +1,4 @@ -// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal +// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected // Line: 4 protected internal enum E { diff --git a/mcs/errors/cs1527.cs b/mcs/errors/cs1527.cs index 189cc472f4c..e847fd14e11 100644 --- a/mcs/errors/cs1527.cs +++ b/mcs/errors/cs1527.cs @@ -1,4 +1,5 @@ -// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal -// Line: +// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected +// Line: 4 + private class X { } diff --git a/mcs/errors/cs1644-62.cs b/mcs/errors/cs1644-62.cs new file mode 100644 index 00000000000..5a29839610d --- /dev/null +++ b/mcs/errors/cs1644-62.cs @@ -0,0 +1,10 @@ +// CS1644: Feature `private protected' cannot be used because it is not part of the C# 6.0 language specification +// Line: 7 +// Compiler options: -langversion:6 + +class C +{ + private protected enum E + { + } +}
\ No newline at end of file |