Original Post
Hello again! As I learned from the documentation all the script sections added to a module with AddScriptSection() will be treated as if one large script, where all declarations are visible to every section, no matter in which order the sections are added to the module. Is this assumption correct? If indeed it is, I think I have found another bug (don't worry no crashes this time :). I have two AngelScript files: file1.as file2.as This should be legal since it's an upcast to the interface A. However I get the compile error: Can't implicitly convert from 'C@' to 'A@&'. If I put everything into a single file (section) the problem goes away. If I change A to be a class, the problem goes away. I've seen the CScriptBuilder resolve the "includes" by first adding the 'file2' section to the Module and then 'file1', so I guess the problem is about the order of the script sections (when interfaces are involved). Thank you. PS: the fixes for the previous issues worked like a charm!
interface A
{
}
class B : A
{
}
#include "file1.as" // inclusion handled by CScriptBuilder (metadata OFF)
class C : B
{
}
void main()
{
A @a = C();
}