https://issues.dlang.org/show_bug.cgi?id=22563
kinke changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #1 from kinke ---
`scope
https://issues.dlang.org/show_bug.cgi?id=22563
--- Comment #2 from Stanislav Blinov ---
It should in @safe code, which is where `scope` matters. The only way to escape
it should be to break @safe. Isn't that the whole point?..
void* global;
struct Escapist(T)
{
T value;
}
@safe
void consum
https://issues.dlang.org/show_bug.cgi?id=22563
--- Comment #3 from Stanislav Blinov ---
IOW, if there is a way to escape it, there's a bug.
--
https://issues.dlang.org/show_bug.cgi?id=22563
--- Comment #4 from kinke ---
This currently compiles even with -dip1000:
```
void consumeThingWithContext(S)(scope S s)
if (is(S == struct) && __traits(isNested, S))
{
static S global;
global = s;
}
//@safe //@nogc
void main()
{
int a;
https://issues.dlang.org/show_bug.cgi?id=22563
--- Comment #5 from Stanislav Blinov ---
Well... the `static S s;` simply shouldn't compile at all for exactly that
reason, so that's one extra bug:
struct WTF(T)
{
static T x;
void foo() { x.foo(); }
}
@safe
void main()
{
int a;
st
https://issues.dlang.org/show_bug.cgi?id=22563
--- Comment #6 from Stanislav Blinov ---
Forgot to add the boom to main:
WTF!Nested.foo;
--
https://issues.dlang.org/show_bug.cgi?id=22563
Stanislav Blinov changed:
What|Removed |Added
See Also||https://issues.dlang.org/sh
https://issues.dlang.org/show_bug.cgi?id=22563
Iain Buclaw changed:
What|Removed |Added
Priority|P1 |P4
--