When a custom class inherits from any nested array type (array<array<...>>), it breaks array initialization of other array types using array literals {}.
Note that the custom class doesn't have to be used, it just needs to exist.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Modding
Steps To Reproduce
Example 1
class ArrayTest1: array<ref TStringArray> { void Insert(int a, int b) { } } array<ref TStringArray> test = {}; TStringArray t = {"Test"}; // works test.Insert(t); // works test.Insert({"Test"}); // compile error "array initialization of non-array type"
Example 2
class ArrayTest2: array<ref array<ref Param1<int>>> { void Insert(int a, int b) { } } array<ref array<ref Param1<int>>> test = {}; array<ref Param1<int>> t = {new Param1<int>(0)}; // works test.Insert(t); // works test.Insert({new Param1<int>(0)}); // compile error "array initialization of non-array type"