You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
1587
mcs/errors/ChangeLog
1587
mcs/errors/ChangeLog
File diff suppressed because it is too large
Load Diff
@@ -83,6 +83,36 @@ dist-local: dist-default
|
||||
|
||||
csproj-local install-local uninstall-local:
|
||||
|
||||
CS0029-26-lib.dll : CS0029-26-lib.cs
|
||||
$(CSCOMPILE) /target:library /publicsign /out:$@ $<
|
||||
|
||||
CS0266-25-lib.dll: CS0266-25-lib.cs
|
||||
$(CSCOMPILE) /target:library /r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll /out:$@ $<
|
||||
|
||||
dlls/first/CS1701-lib.dll: dlls/first/CS1701-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/first/CS1702-lib.dll: dlls/first/CS1702-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/first/CS1703-lib.dll: dlls/first/CS1703-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/first/CS1705-lib.dll: dlls/first/CS1705-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/second/CS1701-lib.dll: dlls/second/CS1701-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/second/CS1702-lib.dll: dlls/second/CS1702-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/second/CS1703-lib.dll: dlls/second/CS1703-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
dlls/second/CS1705-lib.dll: dlls/second/CS1705-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /publicsign /out:$@ $<
|
||||
|
||||
CS1701-lib.dll : CS1701-lib.cs
|
||||
$(CSCOMPILE) /target:library /warn:0 /r:dlls/first/CS1701-lib.dll /out:$@ $<
|
||||
|
||||
|
||||
13
mcs/errors/cs0023-27.cs
Normal file
13
mcs/errors/cs0023-27.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `T'
|
||||
// Line: 11
|
||||
|
||||
class C2<T>
|
||||
{
|
||||
C2<T> i;
|
||||
T field;
|
||||
|
||||
public void Foo ()
|
||||
{
|
||||
var x = i?.field;
|
||||
}
|
||||
}
|
||||
15
mcs/errors/cs0023-28.cs
Normal file
15
mcs/errors/cs0023-28.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `T'
|
||||
// Line: 13
|
||||
|
||||
interface IFoo<T>
|
||||
{
|
||||
T Call ();
|
||||
}
|
||||
|
||||
class C1
|
||||
{
|
||||
U Foo<T, U> (IFoo<T> t)
|
||||
{
|
||||
return t?.Call ();
|
||||
}
|
||||
}
|
||||
10
mcs/errors/cs0023-29.cs
Normal file
10
mcs/errors/cs0023-29.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
// CS0023: The `?' operator cannot be applied to operand of type `T'
|
||||
// Line: 8
|
||||
|
||||
class X
|
||||
{
|
||||
static void Bug<T>(System.Func<T> func)
|
||||
{
|
||||
var r = func?.Invoke ();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// CS0029: Cannot implicitly convert type `B [cs0029-26, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]' to `B [CS0029-26-lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=36f3ae7e947792e3]'
|
||||
// CS0029: Cannot implicitly convert type `B [cs0029-26, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null -- *PATH*/cs0029-26.cs]' to `B [CS0029-26-lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=36f3ae7e947792e3 -- *PATH*/CS0029-26-lib.dll]'
|
||||
// Line: 16
|
||||
// Compiler options: -r:R1=CS0029-26-lib.dll
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// CS0121: The call is ambiguous between the following methods or properties: `A.GetValues(string[], string)' and `A.GetValues(string, params string[])'
|
||||
// Line: 23
|
||||
// CSC BUG: Correct according the spec, no identity conversion to do tie-breaking
|
||||
|
||||
class A
|
||||
{
|
||||
public int GetValues (string[] s, string value = null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int GetValues (string s, params string [] args)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class B
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
var a = new A ();
|
||||
a.GetValues (null);
|
||||
}
|
||||
}
|
||||
29
mcs/errors/cs0121-28.cs
Normal file
29
mcs/errors/cs0121-28.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
// CS0121: The call is ambiguous between the following methods or properties: `Program.Foo(System.Func<string,dynamic>)' and `Program.Foo(System.Func<object>)'
|
||||
// Line: 10
|
||||
|
||||
using System;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
Foo (Bar);
|
||||
}
|
||||
|
||||
public static dynamic Bar (string s1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static object Bar () {
|
||||
return 2;
|
||||
}
|
||||
|
||||
public static void Foo (Func<string, dynamic> input)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Foo (Func<object> input)
|
||||
{
|
||||
}
|
||||
}
|
||||
13
mcs/errors/cs0163-2.cs
Normal file
13
mcs/errors/cs0163-2.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
// CS0163: Control cannot fall through from one case label `case 1:' to another
|
||||
// Line: 9
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
switch (1) {
|
||||
case 1: {}
|
||||
default: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
mcs/errors/cs0266-30.cs
Normal file
14
mcs/errors/cs0266-30.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
// CS0266: Cannot implicitly convert type `Foo<int>.FooEvent' to `Foo<string>.FooEvent'. An explicit conversion exists (are you missing a cast?)
|
||||
// Line: 12
|
||||
|
||||
class Foo<T> {
|
||||
public event FooEvent Event;
|
||||
public delegate T FooEvent();
|
||||
}
|
||||
|
||||
class CompilerCrashTest {
|
||||
static void Main() {
|
||||
Foo<string> foo = new Foo<string>();
|
||||
foo.Event += new Foo<int>.FooEvent (() => 0);
|
||||
}
|
||||
}
|
||||
11
mcs/errors/cs1644-50.cs
Normal file
11
mcs/errors/cs1644-50.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// CS1644: Feature `interpolated strings' cannot be used because it is not part of the C# 5.0 language specification
|
||||
// Line: 9
|
||||
// Compiler options: -langversion:5
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
var x = $"I should not compile";
|
||||
}
|
||||
}
|
||||
12
mcs/errors/cs1922-3.cs
Normal file
12
mcs/errors/cs1922-3.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// CS1922: A field or property `GCEventTypeMatcher' cannot be initialized with a collection object initializer because type `GCEventTypeMatcher' does not implement `System.Collections.IEnumerable' interface
|
||||
// Line: 11
|
||||
|
||||
using System;
|
||||
|
||||
public enum GCEventType {
|
||||
NURSERY_START
|
||||
}
|
||||
|
||||
public class GCEventTypeMatcher {
|
||||
private static GCEventTypeMatcher[] matcher = { new GCEventTypeMatcher () { NURSERY_START, s => TRUE } };
|
||||
}
|
||||
Reference in New Issue
Block a user