TypeError: Cannot read property 'name' of undefined
Original Reporter info from Mantis: henrique @henriquewerlang
-
Reporter name: henrique
Original Reporter info from Mantis: henrique @henriquewerlang
- Reporter name: henrique
Description:
I've added a project with the problem I'm having, it's just an example of what's going on in a larger project I'm working on.
In the unit "UnitError" I declared an array with the name "TMyClassArray", and Try to fetch information from its RTTI.
When I do this, the "TypeError: Cannot read property 'name' of undefined" error occurs, which is why the "ElType" of "TTypeInfoDynArray" is undefined.
This occurs because in js file generation, it is placing the type of a class not yet defined. In the Error.js file this can be seen on line 41, but the implementation of the class occurs only on line 157, when loading the module it is part of.
Additional information:
I'm using the -Jc parameter.
Mantis conversion info:
- Mantis ID: 37762
- OS: Windows
- OS Build: 10
- Build: trunk
- Platform: Pas2Js
- Fixed in revision: 46930.