E61: duplicate local variable

Element build 2479, dated Jan 31, 2020, Island/Windows/Oxygene

This testing project gave me senseless errors

E61: duplicate local variable “success” in scope
E61: Duplicate local variable “shp” in scope

@ck @mh

“Feature request” for future bug reports: non-absolute (hint) paths.

Thanks, logged as bugs://83857

Reproduced in your project but not standalone. Can you reproduce this in a smaller project and/or without the Cirrus aspect?

@mh

I just did another test - removing the Cirrus aspect, and the problem is Gone!

But - this problem only shows up with the recent Element build. Previous Element build definitely doesn’t have this issue (with exactly the same Cirrus aspect)

Just let me know what I can do to help you investigate further?

Maybe a more self-contained test case (with the aspect). Or review what the aspect does, if maybe it affects this to (“correctly”) cause this error. But other than that, I think it’s in Carlo’s hands for next week.

Hi @mh

CheckAndRaiseDisposed is a protected method of the base class DisposableObject

The aspect just insert one line at the beginning of every public method of derived class:
self.CheckAndRaiseDisposed
so if the object has been disposed, while accessing public method of that object, an exception will be thrown.

Hm ok. sounds like a compiler bug then, yeah…

bugs://83857 got closed with status fixed.

Curious - is it related to Cirrus aspect?

Not exactly. But it triggered it.

Everything in the compiler is re-entrant, and applying aspects revisits the body of this method. Tuples had a bug where it didn’t properly do that. It registered the secondary vars, introduced as part of the tuple, twice.