8fc30896db
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
23 lines
375 B
C#
23 lines
375 B
C#
// Compiler options: -langversion:7.2 /unsafe
|
|
|
|
using System;
|
|
|
|
class X
|
|
{
|
|
public static void Main ()
|
|
{
|
|
Span<int> stackSpan = stackalloc int[100];
|
|
|
|
bool b = false;
|
|
|
|
var r1 = !b ? stackalloc char[1] : throw null;
|
|
var r2 = b ? throw null : stackalloc char[1];
|
|
var r3 = b ? stackalloc char[1] : stackalloc char[2];
|
|
}
|
|
|
|
// Disables verifier
|
|
unsafe void Foo ()
|
|
{
|
|
}
|
|
}
|