[Issue 7848] New: pure doesn't work on unittest blocks
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 6 22:43:20 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7848
Summary: pure doesn't work on unittest blocks
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-04-06 22:43:59 PDT ---
This code compiles when it shouldn't:
void main()
{
}
void func()
{
}
pure unittest
{
func();
}
func is impure and should cause the compilation of the unittest block to fail.
It fails if you mark it as @safe (since func is @system), but it doesn't fail
for pure.
--
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