You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.78
Former-commit-id: 46737382176d7b811604042c613d5df6eef74f33
This commit is contained in:
parent
b7cd5de421
commit
6db692b74b
16
mcs/tests/test-948.cs
Normal file
16
mcs/tests/test-948.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Compiler options: -langversion:7.2 -unsafe
|
||||
|
||||
using System;
|
||||
|
||||
class X
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
Span<int> stackSpan = stackalloc int[100];
|
||||
}
|
||||
|
||||
unsafe void Foo ()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
127
mcs/tests/test-async-94.cs
Normal file
127
mcs/tests/test-async-94.cs
Normal file
@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[AsyncMethodBuilder (typeof(MyTaskMethodBuilder<>))]
|
||||
class MyTask<T>
|
||||
{
|
||||
}
|
||||
|
||||
[AsyncMethodBuilder (typeof(MyTaskMethodBuilder))]
|
||||
class MyTask
|
||||
{
|
||||
}
|
||||
|
||||
class MyTaskMethodBuilder
|
||||
{
|
||||
public static MyTaskMethodBuilder Create()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public MyTask Task {
|
||||
get {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetException (Exception exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetResult ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AwaitOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Start<TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetStateMachine (IAsyncStateMachine stateMachine)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class MyTaskMethodBuilder<T>
|
||||
{
|
||||
public static MyTaskMethodBuilder<T> Create()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public MyTask<T> Task {
|
||||
get {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetException (Exception exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetResult (T result)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AwaitOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine> (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Start<TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetStateMachine (IAsyncStateMachine stateMachine)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class X
|
||||
{
|
||||
public async MyTask Test ()
|
||||
{
|
||||
await Task.Delay (1);
|
||||
}
|
||||
|
||||
public async MyTask<int> Test2 ()
|
||||
{
|
||||
await Task.Delay (1);
|
||||
return 2;
|
||||
}
|
||||
|
||||
public async ValueTask<string> Test3 ()
|
||||
{
|
||||
await Task.Delay (1);
|
||||
return "as";
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
var x = new X ();
|
||||
var r1 = x.Test3 ().Result;
|
||||
}
|
||||
}
|
16
mcs/tests/test-readonly-03.cs
Normal file
16
mcs/tests/test-readonly-03.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Compiler options: -langversion:latest
|
||||
using System;
|
||||
|
||||
readonly struct S
|
||||
{
|
||||
static S shared = new S ();
|
||||
|
||||
public S (int arg)
|
||||
{
|
||||
this = shared;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
}
|
||||
}
|
24
mcs/tests/test-ref-10.cs
Normal file
24
mcs/tests/test-ref-10.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// Compiler options: -langversion:latest
|
||||
|
||||
using System;
|
||||
|
||||
ref struct ValueStringBuilder
|
||||
{
|
||||
public override string ToString ()
|
||||
{
|
||||
return "aaa";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class X
|
||||
{
|
||||
public static int Main ()
|
||||
{
|
||||
var s = new ValueStringBuilder ();
|
||||
if (s.ToString () != "aaa")
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
4e488c37bc46fed416be09476a01fed86a94ba5e
|
||||
4dbc7042a8a8252f26b40788a5460fbf138e5b46
|
Reference in New Issue
Block a user