Looks like the context is currently passed for nested functions,
not for nested classes.
On Thursday, 5 January 2023 at 13:47:24 UTC, Adam D Ruppe wrote:
On Thursday, 5 January 2023 at 13:27:23 UTC, Vijay Nayar wrote:
Why is this error only found when declaring a class in the
unittest?
A unittest is just a special function, it can run code and have
local variables.
classes and
On Thursday, 5 January 2023 at 16:41:32 UTC, Adam D Ruppe wrote:
On Thursday, 5 January 2023 at 16:38:49 UTC, Vijay Nayar wrote:
Does that class inherit the scope of the function it is
inside, similar to how an inner class does with an outer class?
yup. They can see the local variables from
On Thursday, 5 January 2023 at 16:38:49 UTC, Vijay Nayar wrote:
Does that class inherit the scope of the function it is inside,
similar to how an inner class does with an outer class?
yup. They can see the local variables from the function.
On Thursday, 5 January 2023 at 13:47:24 UTC, Adam D Ruppe wrote:
On Thursday, 5 January 2023 at 13:27:23 UTC, Vijay Nayar wrote:
Why is this error only found when declaring a class in the
unittest?
A unittest is just a special function, it can run code and have
local variables.
classes and
On Thursday, 5 January 2023 at 13:27:23 UTC, Vijay Nayar wrote:
Why is this error only found when declaring a class in the
unittest?
A unittest is just a special function, it can run code and have
local variables.
classes and structs declared inside it have access to those local
contexts,