diff --git a/src/files/BrsFile.spec.ts b/src/files/BrsFile.spec.ts index be054b026..507b3a3e3 100644 --- a/src/files/BrsFile.spec.ts +++ b/src/files/BrsFile.spec.ts @@ -4351,6 +4351,23 @@ describe('BrsFile', () => { end function `); }); + + it('handles this complicated typecast with intersection and inline interfaces', async () => { + const file = program.setFile('source/main.bs', ` + sub someFunc() + typecast m as { top as roSGNode, optional subscreen as SomeInterface, mainGroup as roSGNodeCustomComponent, config as roAssociativeArray } and SomeOtherInterface + print m.top.title + end sub + `); + + await testTranspile(file, ` + sub someFunc() + ' typecast m as { top as roSGNode, optional subscreen as SomeInterface, mainGroup as roSGNodeCustomComponent, config as roAssociativeArray } and SomeOtherInterface + print m.top.title + end sub + `, undefined, undefined, false); + }); + }); });