You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
24
mcs/errors/cs0029-37.cs
Normal file
24
mcs/errors/cs0029-37.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// CS0029: Cannot implicitly convert type `string' to `int'
|
||||
// Line: 8
|
||||
|
||||
class A<T> where T : CB, IA
|
||||
{
|
||||
void Foo (T t)
|
||||
{
|
||||
t.Prop = "3";
|
||||
}
|
||||
}
|
||||
|
||||
class CB : CA
|
||||
{
|
||||
}
|
||||
|
||||
class CA
|
||||
{
|
||||
public int Prop { get; set; }
|
||||
}
|
||||
|
||||
interface IA
|
||||
{
|
||||
string Prop { get; set; }
|
||||
}
|
||||
15
mcs/errors/cs0122-39.cs
Normal file
15
mcs/errors/cs0122-39.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// CS0122: `A.Y' is inaccessible due to its protection level
|
||||
// Line: 8
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
var x = nameof (A.Y);
|
||||
}
|
||||
}
|
||||
|
||||
public class A
|
||||
{
|
||||
private int Y { get; set; }
|
||||
}
|
||||
21
mcs/errors/cs0177-15.cs
Normal file
21
mcs/errors/cs0177-15.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// CS0177: The out parameter `x' must be assigned to before control leaves the current method
|
||||
// Line: 6
|
||||
|
||||
public class GotoWithOut
|
||||
{
|
||||
public static void Test (bool cond, out int x)
|
||||
{
|
||||
if (cond)
|
||||
{
|
||||
goto Label2;
|
||||
}
|
||||
else
|
||||
{
|
||||
goto Label;
|
||||
}
|
||||
Label:
|
||||
x = 0;
|
||||
Label2:
|
||||
return;
|
||||
}
|
||||
}
|
||||
18
mcs/errors/cs0619-59.cs
Normal file
18
mcs/errors/cs0619-59.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// CS0619: `A.X' is obsolete: `'
|
||||
// Line: 10
|
||||
|
||||
using System;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
var m = nameof (A.X);
|
||||
}
|
||||
}
|
||||
|
||||
public class A
|
||||
{
|
||||
[Obsolete ("", true)]
|
||||
public int X;
|
||||
}
|
||||
11
mcs/errors/cs1070-3.cs
Normal file
11
mcs/errors/cs1070-3.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// CS1070: The type `C' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly `CS1070-lib-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
|
||||
// Line: 5
|
||||
// Compiler options: -r:CS1070-lib.dll
|
||||
|
||||
public class D
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
new C ();
|
||||
}
|
||||
}
|
||||
26
mcs/errors/cs1501-19.cs
Normal file
26
mcs/errors/cs1501-19.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
// CS1501: No overload for method `Call' takes `0' arguments
|
||||
// Line: 8
|
||||
|
||||
class A<T> where T : CB, IA
|
||||
{
|
||||
void Foo (T t)
|
||||
{
|
||||
t.Call ();
|
||||
}
|
||||
}
|
||||
|
||||
class CB : CA
|
||||
{
|
||||
}
|
||||
|
||||
class CA
|
||||
{
|
||||
public void Call (int arg)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
interface IA
|
||||
{
|
||||
void Call (bool arg, int arg2);
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// CS1691: `2' is not a valid warning number
|
||||
// Line: 0
|
||||
// Compiler options: -warnaserror -warnaserror:1691,2
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// CS1691: `20' is not a valid warning number
|
||||
// Line: 0
|
||||
// Compiler options: -warnaserror -warnaserror-:20
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// CS1691: `20' is not a valid warning number
|
||||
// Line: 0
|
||||
// Compiler options: -warnaserror -nowarn:20
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// CS1691: `1' is not a valid warning number
|
||||
// Line: 5
|
||||
// Compiler options: -warnaserror
|
||||
|
||||
#pragma warning disable 1
|
||||
|
||||
18
mcs/errors/cs1744-3.cs
Normal file
18
mcs/errors/cs1744-3.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// CS1744: Named argument `p1' cannot be used for a parameter which has positional argument specified
|
||||
// Line: 8
|
||||
|
||||
internal class Program
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
Method (1, 2, p1: 3);
|
||||
}
|
||||
|
||||
static void Method (int p1, int paramNamed, int p2)
|
||||
{
|
||||
}
|
||||
|
||||
static void Method (int p1, int p2, object paramNamed)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// CS1904: `4013' is not a valid warning number
|
||||
// Line: 0
|
||||
// Compiler options: -nowarn:4014,4013
|
||||
|
||||
class ClassMain {
|
||||
public static void Main () {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user