Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
Mono MCS Errors.
Errors in the Mono C# compiler use the same codes as the
Microsoft C# compiler, the listing of the errors on it lives
in:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscomp/html/vctbsCompilerErrorsSC0001ThroughSC9999.asp
* Format
Error tests are stored in files with the format:
csXXXX.cs for the first error.
csXXXX-2.cs for the second way to trigger the error.
csXXXX-n.cs for subsequent ways of triggering the error.
The file should start with two inline commented lines.
The first one contains a little description of the error,
the second line declares the line where the error occurs.
You should not copy Microsoft's examples or documentation
text. You will need to write your own.
For example:
// CS0057: Inconsistent accessibility. Parameter type is less accessible than operator.
// Line: 10
** Note 1: If your error or warning message does not contain source line
location use syntax `// Line : 0'
** Note 2: Because in some special cases the error message can differ
between runtimes. The special syntax exists where you can specify message
for 2.0 runtime.
For example:
// CS0057: Uknown error
// GMCS0057: Uknown error 2.0
// Line: 10
There should not be more than one error per tests. Each test
should only contain one error.
Then you have to add the file to the SVN and commit it.
The next thing is to write a short text file with a little
description of what the error is and what it's necessary
to be done to solve it.
* Compiler options
If you need to run error test with some special option(s),
use following syntax in your error test file.
// cs0193.cs: * or -> operator can only be applied to pointer types.
// Line: 9
// Compiler options: -unsafe
* Dependencies
In case that your error test depends on the library or other C# file.
Create separate file with same name as your error test name except
first two letters which are uppercased. And then add this file to
Makefile.
* Known errors
Many of the errors in this test suite are not tested for by MCS. To cope
with this, we have a list of failures, so that someone running the test
can know if they have caused any regressions.
In this model there are two types of regressions:
* Incorrect error -- When mcs emits an error, but it is different
than the one CSC emits.
* No error -- When mcs incorrectly compiles an invalid file.
`Incorrect error' regressions should be listed in mcs-expect-wrong-error.
`No error' regressiions should be listed in mcs-expect-no-error.
If you fix a bug and thus remove a regression, be sure to remove the file
from the failures list!
* Errors not suported by Mono compiler
Here is a list of errors reported by csc 1.0, 1.1 and not supported by Mono.
Please add comment for every error.
CS0134: not supported by csc 2.0
CS0576: not supported by csc 2.0
CS0580: Included in error CS1501 (not supported by csc 2.0)
CS0581: Included in error CS0117 (not supported by csc 2.0)
CS0654: not supported by csc 2.0

View File

@@ -0,0 +1,48 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-10-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-10-lib.dll'
.class public auto ansi sealed D`1<(I) T>
extends [mscorlib]System.MulticastDelegate
{
.method public hidebysig specialname rtspecialname
instance void .ctor(object 'object',
native int 'method') runtime managed
{
}
.method public hidebysig newslot virtual
instance !T Invoke() runtime managed
{
}
.method public hidebysig newslot virtual
instance class [mscorlib]System.IAsyncResult
BeginInvoke(class [mscorlib]System.AsyncCallback callback,
object 'object') runtime managed
{
}
.method public hidebysig newslot virtual
instance !T EndInvoke(class [mscorlib]System.IAsyncResult result) runtime managed
{
}
}
.class interface public abstract auto ansi I
implements ['CS0012-lib-missing']I1
{
}

View File

@@ -0,0 +1,34 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-11-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-11-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig instance class ['CS0012-lib-missing']A/Nested
Test() cil managed
{
IL_0000: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,28 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-12-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-12-lib.dll'
.class public auto ansi beforefieldinit Lib1.Class1`1<T>
extends class ['CS0012-lib-missing']Lib2.Class1`1<class ['CS0012-lib-missing']Lib2.Class2>
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void class ['CS0012-lib-missing']Lib2.Class1`1<class ['CS0012-lib-missing']Lib2.Class2>::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,30 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-13-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-13-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.field public static literal class ['CS0012-lib-missing']A1 Value = nullref
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,36 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-14-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-14-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig static void Foo(object o) cil managed
{
ret
}
.method public hidebysig static void Foo<(['CS0012-lib-missing']AA) T>(!!T t) cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ret
}
}

View File

@@ -0,0 +1,31 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-15-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-15-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig static void Foo<(['CS0012-lib-missing']AA) T>(!!T t) cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ret
}
}

View File

@@ -0,0 +1,36 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-16-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-16-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig static void Foo(object o) cil managed
{
ret
}
.method public hidebysig static void Foo(class ['CS0012-lib-missing']AA t) cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ret
}
}

View File

@@ -0,0 +1,31 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-17-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-17-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig static void Foo<(class ['CS0012-lib-missing']AA`1<!!T>) T>() cil managed
{
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ret
}
}

View File

@@ -0,0 +1,30 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-18-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-18-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.field public static literal valuetype ['CS0012-lib-missing']E e = int32(0x00000001)
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
ret
}
}

View File

@@ -0,0 +1,37 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-2-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-2-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Test(class ['CS0012-lib-missing']A1[] args) cil managed
{
.maxstack 8
IL_0000: nop
IL_0001: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,31 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-21-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-21-lib.dll'
.class public auto ansi beforefieldinit B
extends class ['CS0012-lib-missing']X`1/Y/Z/W<int32>
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class ['CS0012-lib-missing']X`1/Y/Z/W<int32>::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,40 @@
.assembly extern mscorlib
{
}
.assembly extern System.Core
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-22-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-22-lib.dll'
.class public abstract auto ansi sealed beforefieldinit B
extends [mscorlib]System.Object
{
.custom instance void [System.Core]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig static void
Sum(class [mscorlib]System.Collections.Generic.IEnumerable`1<float64> a) cil managed
{
ret
}
.method public hidebysig static void
Sum(class ['CS0012-lib-missing']Base.IQueryExpr`1<class [mscorlib]System.Collections.Generic.IEnumerable`1<float64>> a) cil managed
{
.custom instance void [System.Core]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
ret
}
}

View File

@@ -0,0 +1,45 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-3-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-3-lib.dll'
.class public auto ansi beforefieldinit BB
extends ['CS0012-lib-missing']A1
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ['CS0012-lib-missing']A1::.ctor()
IL_0006: ret
}
}
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.field public class BB 'value'
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,55 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-4-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-4-lib.dll'
.class public auto ansi beforefieldinit BB
extends [mscorlib]System.Object
implements ['CS0012-lib-missing']I1
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig specialname instance void
set_Prop(class BB 'value') cil managed
{
IL_0000: nop
IL_0001: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.property instance class BB Prop()
{
.set instance void B::set_Prop(class BB)
}
}

View File

@@ -0,0 +1,36 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-5-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-5-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit N
extends [mscorlib]System.ValueType
implements ['CS0012-lib-missing']I1
{
.pack 0
.size 1
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,28 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-6-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-6-lib.dll'
.class public auto ansi beforefieldinit A
extends ['CS0012-lib-missing']A1
{
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void ['CS0012-lib-missing']A1::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,33 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-9-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-9-lib.dll'
.class public auto ansi beforefieldinit A
extends [mscorlib]System.Object
{
.method public hidebysig static void M<(['CS0012-lib-missing']A1) T>() cil managed
{
IL_0000: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

42
mcs/errors/CS0012-lib.il Normal file
View File

@@ -0,0 +1,42 @@
.assembly extern mscorlib
{
}
.assembly extern 'CS0012-lib-missing'
{
}
.assembly 'CS0012-lib'
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module 'CS0012-lib.dll'
.class public auto ansi beforefieldinit B
extends [mscorlib]System.Object
{
.method public hidebysig instance class ['CS0012-lib-missing']A1
Test() cil managed
{
.locals init (class ['CS0012-lib-missing']A1 V_0)
IL_0000: nop
IL_0001: ldnull
IL_0002: stloc.0
IL_0003: br.s IL_0005
IL_0005: ldloc.0
IL_0006: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}

View File

@@ -0,0 +1,12 @@
public class External
{
public static bool op_Equality (External p1, int p2)
{
return false;
}
public static bool op_Inequality (External p1, int p2)
{
return false;
}
}

Some files were not shown because too many files have changed in this diff Show More