December 02, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7052

           Summary: @system on @safe class methods inconsistency
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: code@klickverbot.at


--- Comment #0 from klickverbot <code@klickverbot.at> 2011-12-02 09:55:41 PST ---
Consider:
---
void unsafe() {}
@safe class Foo {
  void bar() @system {
    unsafe();
  }
}
---

DMD 2.057 Git (887dda0ba) fails with:
---
Error: safe function 'bar' cannot call system function 'unsafe'
---


The following two examples compile, however (note the different position of @system in the first example):
---
void unsafe() {}
@safe class Foo {
  @system void bar() {
    unsafe();
  }
}
---
---
void unsafe() {}
@safe class Foo {
  void bar() @trusted {
    unsafe();
  }
}
---


Given that the effects of @safe being applied to classes don't seem to be mentioned in the spec, this is technically not a rejects-valid bug, but certainly very inconsistent.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 20, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7052


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |verylonglogin.reg@gmail.com
         Resolution|                            |WORKSFORME


--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-10-20 14:12:46 MSD ---
The case from description compiles now as in case of different attributes the weaker is selected. See Issue 11304.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------