Issue 9371 - @safe works or doesn't depending on the position
Summary: @safe works or doesn't depending on the position
Status: RESOLVED DUPLICATE of issue 9401
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-22 11:53 UTC by Dmitry Olshansky
Modified: 2013-09-09 10:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Dmitry Olshansky 2013-01-22 11:53:40 UTC
@system:  //required to show the bug

@safe void foo() {}
void bar() @safe {} //this is not @safe somehow!!

@safe void test()
{
    foo();
    bar();
}


DMD 2.061 outputs:

bug_safe.d(9): Error: safe function 'bug_safe.test' cannot call system function 'bug_safe.bar'
Comment 1 monarchdodra 2013-01-26 06:28:36 UTC
Possibly related:
http://d.puremagic.com/issues/show_bug.cgi?id=9401
Comment 2 Dmitry Olshansky 2013-09-09 10:36:52 UTC

*** This issue has been marked as a duplicate of issue 9401 ***