Today compiled the project, there was a strange error, as follows:
E:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:415311>if(File.name.toLowerCase ()inchSortedMap)1> ^1>rangeerror:maximum Call stack size exceeded1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41531:48)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)1> at Insert (e:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41534:21)
Because the error did not give detailed information, but probably can see and parse the code file into the dead loop related, and finally can only back up the submission to debug.
Finally found the problem, here is a simple record:
Suppose I have a a.ts:
1 class A {} 2 class C extends B {}
There is also a b.ts:
1 class B extends A {}
This problem occurs when a class inherits from another file, and the class in the file inherits the class from the current file.
Find the problem solved more, you can add a c.ts to put Class C, you can put class B into the a.ts file, only to avoid the above situation can be.
Compilation error of Egret project Typescript