Found by a test case of asbind20.
Script segment:
my_enum[] arr(n: 2);
assert(arr.size == 2);
assert(arr[0] == my_enum::zero);
assert(arr[1] == my_enum::zero);
The message callback says:
ERROR (factory_size_enum:3:15): No conversion from 'my_enum' to 'int64' available.
ERROR (factory_size_enum:4:15): No conversion from 'my_enum' to 'int64' available.
The test suites of asbind20 are using its own array implementation, here are the declarations of related interfaces:
array<T> //array type registered to the script engine
// opIndex declarations
T& opIndex(int)
const T& opIndex(int) const
// enum in C++
// registered by RegisterEnumValue
enum my_enum
{
neg_one = -1,
zero = 0,
one = 1
}
The above example is using code from the newest commit of AngelScript.
This script compiles & runs as expected using AS 2.38 & 2.37.
Found by a test case of asbind20.
Script segment:
The message callback says:
The test suites of asbind20 are using its own array implementation, here are the declarations of related interfaces:
The above example is using code from the newest commit of AngelScript.
This script compiles & runs as expected using AS 2.38 & 2.37.