> On Jul 27, 2016, at 12:57 AM, cy via dmd-internals 
> <[email protected]> wrote:
> 
> I'm not sure, but I think "bar".sizeof is supposed to evaluate to 3 at 
> compile time, rather than 16 regardless of the string's length.

I think you have that backwards. “bar” is an immutable(char)[], which is a 
struct with a pointer and a size_t. Should be 16.

This may be a holdover from older compilers, when “bar” was actually typed as 
char[3]. Definitely seems like a bug in CTFE, please file.

Note, this compiles with latest released compiler, so it should be flagged a 
regression. I think the issue was there, but hashOf has gone through some 
changes recently for safety, so that probably uncovered the issue.

-Steve


_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to