Closed GoogleCodeExporter closed 8 years ago
Here's some related behavior.
> namespace space0 with type t = int; end;
> namespace space1 with type t v = typep space0::t v; using namespace space0; k
x = 0; end; // works fine, but..
> namespace space2 with using namespace space0; type t v = typep ::space0::t v;
k x = 0; end; // crashes
Assertion failed: (qual.empty()), function checkfuns, file interpreter.cc, line
6420.
Abort trap: 6 (core dumped)
Same result if in the last line one uses space0::t instead of ::space0::t. The
typename being defined does need to match the (unqualified version of) of the
typename being referenced. Notice there's no crash when defining namespace1,
though.
Original comment by dubious...@gmail.com
on 14 Jun 2012 at 5:07
Yep, that's a bug, still the same in 0.55. Thanks for reporting, I'll have a
look at it asap.
Original comment by aggraef@gmail.com
on 14 Jun 2012 at 5:34
This issue was closed by revision ae4f2f2e9f4b.
Original comment by aggraef@gmail.com
on 15 Jun 2012 at 1:17
That assertion was simply bogus. According to the namespacing rules, both
instances of the symbol e in the last line of your example should be promoted
to the bar namespace, because foo is being defined there.
Original comment by aggraef@gmail.com
on 15 Jun 2012 at 1:22
Thanks for the speedy fixes.
Original comment by dubious...@gmail.com
on 15 Jun 2012 at 9:49
As you've seen, impossible things take a bit longer. :) Thanks a lot for the
nice bug reports, that makes my job much easier.
Original comment by aggraef@gmail.com
on 15 Jun 2012 at 3:34
Original issue reported on code.google.com by
dubious...@gmail.com
on 14 Jun 2012 at 2:58