April 16, 2018
https://issues.dlang.org/show_bug.cgi?id=18472

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #9 from Mike Franklin <slavo5150@yahoo.com> ---
Working on a fix at https://github.com/dlang/dmd/pull/8173

--
April 16, 2018
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #10 from Mike Franklin <slavo5150@yahoo.com> ---
PR 8173 seems to take care of the case...

module betterc;
enum b = typeid(size_t) is typeid(uint)

... but still fails for ...

import std.format;
import std.stdio;
void main()
{
    enum s = "%1$s,%2$s".format("foo","bar");
    writeln(s);
}

... with the same TypeInfo error.

However, if I comment out the TypeInfo check altogether, the `format` test case fails with...

phobos/std/range/primitives.d(405): Error: static assert:  "Cannot put a
const(char)[] into a Appender!string."
phobos/std/format.d(1184):        instantiated from here: put!(Appender!string,
const(char)[])
/phobos/std/format.d(473):        instantiated from here:
writeUpToNextSpec!(Appender!string)
phobos/std/format.d(6168):        instantiated from here:
formattedWrite!(Appender!string, char, string, string)
main.d(5):        instantiated from here: format!(char, string, string)

I'm wondering if there was another change to Phobos around the same time frame was the TypeInfo change that prevents the `format` expression from evaluating at compile-time.

--
May 02, 2018
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #11 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/cb2b0b848a1c6a2b208ba12257f6204c725744e4 Partial fix for Issue 18472 - permit using typeid at compile-time in betterC

https://github.com/dlang/dmd/commit/a402a791694df063d8bd7a5b9d2f6651e9185cee Merge pull request #8173 from JinShil/fix_18472

 Partial fix for Issue 18472 - permit using typeid at compile-time in betterC
merged-on-behalf-of: Jacob Carlborg <jacob-carlborg@users.noreply.github.com>

--
August 02, 2018
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #12 from Mike Franklin <slavo5150@yahoo.com> ---
This appears to work now in nightly:

import std.format;
import std.stdio;
void main()
{
    enum s = "%1$s,%2$s".format("foo","bar");
    writeln(s);
}

https://run.dlang.io/is/BDyoHF

It may have been fixed inadvertently by https://github.com/dlang/dmd/pull/8523

--
August 02, 2018
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #13 from Mike Franklin <slavo5150@yahoo.com> ---
(In reply to Mike Franklin from comment #12)
> This appears to work now in nightly:
> 
> import std.format;
> import std.stdio;
> void main()
> {
>     enum s = "%1$s,%2$s".format("foo","bar");
>     writeln(s);
> }
> 
> https://run.dlang.io/is/BDyoHF
> 
> It may have been fixed inadvertently by https://github.com/dlang/dmd/pull/8523

Gah, scratch that. Forgot to add the -betterC flag. :-(

--
October 17, 2019
https://issues.dlang.org/show_bug.cgi?id=18472

Mike Parker <aldacron@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldacron@gmail.com

--- Comment #14 from Mike Parker <aldacron@gmail.com> ---
A bounty has been set on this issue:

https://www.flipcause.com/secure/cause_pdetails/NjU3MTQ=

--
December 09, 2022
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #15 from Dlang Bot <dlang-bot@dlang.rocks> ---
@etcimon updated dlang/dmd pull request #14676 "Fix 18472: betterC cannot use format at compile time." fixing this issue:

- Fix 18472: betterC cannot use format at compile time.

https://github.com/dlang/dmd/pull/14676

--
February 28, 2023
https://issues.dlang.org/show_bug.cgi?id=18472

--- Comment #16 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #14930 "fix Issue 18472: betterC cannot use format at compile time" fixing this issue:

- fix Issue 18472: betterC cannot use format at compile time

https://github.com/dlang/dmd/pull/14930

--
February 28, 2023
https://issues.dlang.org/show_bug.cgi?id=18472

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #17 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #14930 "fix Issue 18472: betterC cannot use format at compile time" was merged into master:

- 116d35134cc17fc06fc4b3ad1ed9af65b44e7d39 by Walter Bright:
  fix Issue 18472: betterC cannot use format at compile time

https://github.com/dlang/dmd/pull/14930

--
March 01, 2023
https://issues.dlang.org/show_bug.cgi?id=18472

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=23754

--