[Issue 5297] The lookup order of recursive with statements is undefined.

2021-01-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5297

mhh  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||maxha...@gmail.com
 Resolution|--- |FIXED

--- Comment #5 from mhh  ---
Doesn't seem to be a problem anymore

--


[Issue 5297] The lookup order of recursive with statements is undefined.

2012-01-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5297


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-20 
11:29:23 PST ---
The spec looks correct to me. The lookup order is not undefined, each
successive with introduces a new scope which overrides previous scopes.

As for the shadowing, that is a bug in the compiler.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5297] The lookup order of recursive with statements is undefined.

2010-12-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5297


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2010-12-01 12:39:36 PST ---
(In reply to comment #1)
 Symbols used in with should shadow symbols from other
 with statements.

Do you mean shouldn't?

This shadowing is not detected, and I think the compiler has to flag this is as
a compile error (just like it does with normal variables in the function stack
frame):

struct X { int a; }
struct Y { int a; }
void main() {
X x;
Y y;
with (x) {
a = 2;
with (y) {
a = 1;
}
}
assert(x.a == 2);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5297] The lookup order of recursive with statements is undefined.

2010-12-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5297



--- Comment #3 from Simen Kjaeraas simen.kja...@gmail.com 2010-12-01 14:59:32 
PST ---
(In reply to comment #2)
 (In reply to comment #1)
  Symbols used in with should shadow symbols from other
  with statements.
 
 Do you mean shouldn't?

Yes and no. It shouldn't silently do so, but it should detect that that is what
is happening, and cry out loudly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---