mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
C#: Add inline array test to expressions.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user