[Issue 9463] New: make @safe "non-escapable"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 6 12:50:58 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9463
Summary: make @safe "non-escapable"
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jfanatiker at gmx.at
--- Comment #0 from jfanatiker at gmx.at 2013-02-06 12:50:57 PST ---
Currently the following code is valid:
@safe {
int test1() @system {
int* p=new int;
*p++=8;
return 7;
}
}
So you can mark code system in an already safe section, this makes it
impossible to import code into an application in a safe way. With un-escapable
'@safe' the above code would be invalid and one could do for example the
following:
@safe {
mixin(import("app.cfg"));
}
for simply guaranteeing that app.cfg only contains safe code.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list