On Thursday, 8 February 2018 at 00:24:22 UTC, Walter Bright wrote:
On 2/7/2018 8:03 AM, Ralph Doncaster wrote:
As expected,
auto data = cast(ubyte[]) x"deadbeef";
works with -betterC, but
auto data = cast(ubyte[]) hexString!"deadbeef";
does not.


When I tried it:

  import std.conv;
  void test() {
    auto data = cast(ubyte[]) hexString!"deadbeef";
  }

with:

  dmd -c -betterC test2.d

it compiled without complaint. Are you doing something different? (This is why posting complete examples, not snippets, is better. That way I don't have to fill in the blanks with guesswork.)

https://run.dlang.io/is/TEJDZO and hit "Run".

I also opened a Bugzilla issue, s.t. it doesn't get lost https://issues.dlang.org/show_bug.cgi?id=18395

Reply via email to