After some crafty debugging from @hsorby, he found that the underlying cause of an issue I have been seeing is that the analyser model returned from an analyser we lose some critical information, needed by the generator, once the originating analyser goes out of scope (see test below). This is not typically an issue in our current testing as analysing and code generation tends to happen in a single chunk of code. The following test will fail when retrieving the generator->implementationCode() string when the GeneratorImpl::generateCode() method attempts to navigate the AST.
After some crafty debugging from @hsorby, he found that the underlying cause of an issue I have been seeing is that the analyser model returned from an analyser we lose some critical information, needed by the generator, once the originating analyser goes out of scope (see test below). This is not typically an issue in our current testing as analysing and code generation tends to happen in a single chunk of code. The following test will fail when retrieving the
generator->implementationCode()
string when theGeneratorImpl::generateCode()
method attempts to navigate the AST.