Lookahead in unittest
Stefan Koch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 10 09:17:17 PDT 2017
On Wednesday, 10 May 2017 at 16:09:06 UTC, Raiderium wrote:
> Heyo,
>
> On 2.074.0, the following test fails with "Error: undefined
> identifier 'B' "
>
> unittest
> {
> class A { B b; }
> class B { }
> }
>
> I can't figure out if this is intended behaviour. It's making a
> template-heavy module difficult to test. Would appreciate any
> help.
>
> First post here, be gentle :)
It looks like this unitest-test block are treated like a function.
What is the surrounding code ?
If this is at module level then it is a bug.
More information about the Digitalmars-d-learn
mailing list