[article] Language Design Deal Breakers
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed May 29 10:17:29 PDT 2013
On 5/29/13 11:44 AM, Kenji Hara wrote:
> Andrei, if the variable type has some indirections, it would be
> correctly rejected.
>
> @safe void foo()
> {
> int* x = void; // error
> }
>
> Error: variable test.foo.x void initializers for pointers not allowed in
> safe functions
>
> So I'm not sure bug 10201 is correct or not...
>
> Kenji Hara
Oh, sorry about that. If all the type has no indirections, then
"= void" should work in @safe code.
Andrei
More information about the Digitalmars-d
mailing list