C#: Add inline array test to expressions.

This commit is contained in:
Michael Nebel
2024-01-16 13:32:25 +01:00
parent de831d188f
commit ae52779cf6
2 changed files with 1498 additions and 1472 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -85,7 +85,8 @@ namespace Expressions
other[i, Nested.constant] = this[0, ""]; // indexer write and read access, and access to constant through static type reference
int[] array = { (int)4ul, (int)3l }; // array creation
array[1] = 5; // array element access
MyInlineArray inlinearray = new MyInlineArray();
inlinearray[2] = 7; // inline array element access
}
void MainIsAsCast(string s, object o, object p)
@@ -507,4 +508,10 @@ namespace Expressions
var y = typeof((bool, int[], dynamic));
}
}
[System.Runtime.CompilerServices.InlineArray(10)]
struct MyInlineArray
{
private int myInlineArrayElements;
}
}