You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
33
mcs/errors/CS0012-24-lib.il
Normal file
33
mcs/errors/CS0012-24-lib.il
Normal file
@@ -0,0 +1,33 @@
|
||||
.assembly extern 'cs0012-24-missing'
|
||||
{
|
||||
}
|
||||
|
||||
.assembly extern mscorlib
|
||||
{
|
||||
}
|
||||
|
||||
.assembly 'CS0012-24-lib'
|
||||
{
|
||||
}
|
||||
|
||||
.module 'cs0012-24-lib.dll'
|
||||
|
||||
.class public auto ansi beforefieldinit A
|
||||
extends ['cs0012-24-missing']A0
|
||||
{
|
||||
|
||||
.method public hidebysig specialname rtspecialname
|
||||
instance default void '.ctor' () cil managed
|
||||
{
|
||||
ldarg.0
|
||||
call instance void class ['cs0012-24-missing']A0::'.ctor'()
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static hidebysig
|
||||
default void Test () cil managed
|
||||
{
|
||||
ret
|
||||
}
|
||||
|
||||
}
|
@@ -21,7 +21,7 @@ DISTFILES = \
|
||||
$(wildcard dlls/second/*.cs)
|
||||
|
||||
TEST_SUPPORT_FILES = \
|
||||
CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
|
||||
CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0012-24-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
|
||||
CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \
|
||||
CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \
|
||||
CS0315-2-lib.dll \
|
||||
|
11
mcs/errors/cs0012-24.cs
Normal file
11
mcs/errors/cs0012-24.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// CS0012: The type `A0' is defined in an assembly that is not referenced. Consider adding a reference to assembly `cs0012-24-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
|
||||
// Line: 9
|
||||
// Compiler options: -r:CS0012-24-lib.dll
|
||||
|
||||
public class X
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
A.Test ();
|
||||
}
|
||||
}
|
12
mcs/errors/cs0021-5.cs
Normal file
12
mcs/errors/cs0021-5.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// CS0021: Cannot apply indexing with [] to an expression of type `object'
|
||||
// Line: 9
|
||||
|
||||
class C
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
var d = new object {
|
||||
["a"] = 1
|
||||
};
|
||||
}
|
||||
}
|
13
mcs/errors/cs0023-20.cs
Normal file
13
mcs/errors/cs0023-20.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `int'
|
||||
// Line: 11
|
||||
|
||||
using System;
|
||||
|
||||
class C
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
int k = 0;
|
||||
var r = k?.ToString ();
|
||||
}
|
||||
}
|
12
mcs/errors/cs0023-21.cs
Normal file
12
mcs/errors/cs0023-21.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `int*'
|
||||
// Line: 10
|
||||
// Compiler options: -unsafe
|
||||
|
||||
class C
|
||||
{
|
||||
unsafe static void Main ()
|
||||
{
|
||||
int* arr = null;
|
||||
var v2 = arr?.ToString ();
|
||||
}
|
||||
}
|
10
mcs/errors/cs0023-22.cs
Normal file
10
mcs/errors/cs0023-22.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `null'
|
||||
// Line: 8
|
||||
|
||||
class C
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
var res = null?[0];
|
||||
}
|
||||
}
|
12
mcs/errors/cs0023-23.cs
Normal file
12
mcs/errors/cs0023-23.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `void'
|
||||
// Line: 10
|
||||
|
||||
using System;
|
||||
|
||||
class C
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
var v = Console.WriteLine ()?[0];
|
||||
}
|
||||
}
|
11
mcs/errors/cs0023-24.cs
Normal file
11
mcs/errors/cs0023-24.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `int'
|
||||
// Line: 9
|
||||
|
||||
public class C
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
string s = null;
|
||||
var x = s?.Length?.ToString ();
|
||||
}
|
||||
}
|
16
mcs/errors/cs0111-10.cs
Normal file
16
mcs/errors/cs0111-10.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// CS0111: A member `Test.EmptyClass.~EmptyClass()' is already defined. Rename this member or use different parameter types
|
||||
// Line: 12
|
||||
|
||||
namespace Test
|
||||
{
|
||||
public class EmptyClass
|
||||
{
|
||||
~EmptyClass ()
|
||||
{
|
||||
}
|
||||
|
||||
~EmptyClass ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
// CS0163: Control cannot fall through from one case label `case 1:' to another
|
||||
// Line: 14
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
static class C
|
||||
{
|
||||
public static IEnumerable<int> Test (int key)
|
||||
{
|
||||
switch (key) {
|
||||
case 1:
|
||||
yield return 0;
|
||||
case 2:
|
||||
yield return 2;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException ("symbol:" + key);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,23 +1,20 @@
|
||||
// CS0163: Control cannot fall through from one case label `case 3:' to another
|
||||
// Line: 21
|
||||
// CS0163: Control cannot fall through from one case label `case 1:' to another
|
||||
// Line: 14
|
||||
|
||||
public class Foo
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
static class C
|
||||
{
|
||||
public static void Main()
|
||||
public static IEnumerable<int> Test (int key)
|
||||
{
|
||||
int a=5;
|
||||
int b=10;
|
||||
int c;
|
||||
|
||||
switch (a)
|
||||
{
|
||||
case 1: c=a+b;
|
||||
return;
|
||||
|
||||
case 2: c=a-b;
|
||||
return;
|
||||
|
||||
case 3: c=a*b;
|
||||
switch (key) {
|
||||
case 1:
|
||||
yield return 0;
|
||||
case 2:
|
||||
yield return 2;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException ("symbol:" + key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
21
mcs/errors/cs0165-45.cs
Normal file
21
mcs/errors/cs0165-45.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// CS0165: Use of unassigned local variable `v'
|
||||
// Line: 19
|
||||
|
||||
using System;
|
||||
|
||||
class X
|
||||
{
|
||||
void Foo (out int value)
|
||||
{
|
||||
value = 1;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
int v;
|
||||
X x = null;
|
||||
|
||||
x?.Foo (out v);
|
||||
Console.WriteLine (v);
|
||||
}
|
||||
}
|
21
mcs/errors/cs0165-46.cs
Normal file
21
mcs/errors/cs0165-46.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// CS0165: Use of unassigned local variable `a'
|
||||
// Line: 16
|
||||
|
||||
class Test
|
||||
{
|
||||
public static bool Foo (out int v)
|
||||
{
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
int a;
|
||||
bool b = false;
|
||||
if ((b || Foo (out a)) && b)
|
||||
return;
|
||||
else
|
||||
System.Console.WriteLine (a);
|
||||
}
|
||||
}
|
21
mcs/errors/cs0165-47.cs
Normal file
21
mcs/errors/cs0165-47.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// CS0165: Use of unassigned local variable `a'
|
||||
// Line: 17
|
||||
|
||||
class Test
|
||||
{
|
||||
public static bool Foo (out int v)
|
||||
{
|
||||
v = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
int a;
|
||||
bool b = false;
|
||||
|
||||
if ((b && Foo (out a)) || b) {
|
||||
System.Console.WriteLine (a);
|
||||
}
|
||||
}
|
||||
}
|
24
mcs/errors/cs0165-48.cs
Normal file
24
mcs/errors/cs0165-48.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// CS0165: Use of unassigned local variable `v'
|
||||
// Line: 19
|
||||
|
||||
using System;
|
||||
|
||||
class X
|
||||
{
|
||||
int this [int v] {
|
||||
get {
|
||||
return 1;
|
||||
}
|
||||
set {
|
||||
}
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
int v;
|
||||
X x = null;
|
||||
|
||||
var r = x?[v = 2];
|
||||
Console.WriteLine (v);
|
||||
}
|
||||
}
|
22
mcs/errors/cs0165-49.cs
Normal file
22
mcs/errors/cs0165-49.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
// CS0165: Use of unassigned local variable `a'
|
||||
// Line: 14
|
||||
|
||||
class C
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
bool x = true, y = true, z = true;
|
||||
|
||||
int a;
|
||||
if (x ? y : (z || Foo (out a)))
|
||||
System.Console.WriteLine (z);
|
||||
else
|
||||
System.Console.WriteLine (a);
|
||||
}
|
||||
|
||||
static bool Foo (out int f)
|
||||
{
|
||||
f = 1;
|
||||
return true;
|
||||
}
|
||||
}
|
18
mcs/errors/cs0171-7.cs
Normal file
18
mcs/errors/cs0171-7.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// CS0171: Field `S1.s2' must be fully assigned before control leaves the constructor
|
||||
// Line: 11
|
||||
|
||||
using System;
|
||||
|
||||
struct S1
|
||||
{
|
||||
S2 s2;
|
||||
|
||||
public S1 (int arg)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
struct S2
|
||||
{
|
||||
int field;
|
||||
}
|
12
mcs/errors/cs0426-4.cs
Normal file
12
mcs/errors/cs0426-4.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// CS0426: The nested type `WriteLINE' does not exist in the type `System.Console'
|
||||
// Line: 10
|
||||
|
||||
using System;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
var x = nameof (Console.WriteLINE);
|
||||
}
|
||||
}
|
26
mcs/errors/cs0429-5.cs
Normal file
26
mcs/errors/cs0429-5.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
// CS0429: Unreachable expression code detected
|
||||
// Line: 24
|
||||
// Compiler options: -warnaserror
|
||||
|
||||
using System;
|
||||
|
||||
struct S
|
||||
{
|
||||
}
|
||||
|
||||
class C
|
||||
{
|
||||
public static implicit operator S (C c)
|
||||
{
|
||||
return new S ();
|
||||
}
|
||||
}
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main ()
|
||||
{
|
||||
C c = new C ();
|
||||
Console.WriteLine (c ?? new S ());
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user