toString doesn't compile with -dip1000 switch

2022-08-01 Thread wjoe via Digitalmars-d-learn
struct Foo() { import std.format: FormatSpec; const void toString( scope void delegate(const(char)[]) @safe sink, FormatSpec!char fmt) {} } struct Bar { import std.format: FormatSpec; const void toString( scope void delegate(const(char)[]) @safe sink, FormatSpec!char fmt

Re: toString doesn't compile with -dip1000 switch

2022-08-01 Thread Kagamin via Digitalmars-d-learn
Bar.toString is typed `@system`.

Re: toString doesn't compile with -dip1000 switch

2022-08-01 Thread wjoe via Digitalmars-d-learn
On Monday, 1 August 2022 at 13:09:01 UTC, Kagamin wrote: Bar.toString is typed `@system`. Even if I'd declare everything @safe: at module scope?

Re: toString doesn't compile with -dip1000 switch

2022-08-01 Thread wjoe via Digitalmars-d-learn
On Monday, 1 August 2022 at 17:07:43 UTC, wjoe wrote: On Monday, 1 August 2022 at 13:09:01 UTC, Kagamin wrote: Bar.toString is typed `@system`. Even if I'd declare everything @safe: at module scope? I wrote that on my phone and it got a bit messy... ``` D module x; @safe: struct Foo() {