Bug 8459 – std.traits.isSafe behavior silently changed

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-28T15:28:00Z
Last change time
2012-07-28T17:22:12Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-07-28T15:28:44Z
The following snipped compiles with DMD 2.059, but doesn't with latest Git master (after pull #679 was merged): --- import std.traits; void safe() @safe; void trusted() @trusted; void system() @system; struct Test { void safe() @safe; void trusted() @trusted; void system() @system; } static assert(isSafe!(safe)); static assert(isSafe!(trusted)); static assert(!isSafe!(system)); Test t; static assert(isSafe!(t.safe)); static assert(isSafe!(t.trusted)); static assert(!isSafe!(t.system)); ---- See https://github.com/D-Programming-Language/phobos/pull/675 for the discussion – I added it here so it isn't missed when preparing the release.
Comment #1 by github-bugzilla — 2012-07-28T17:20:37Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/9ca21ef2e7ab25aadd5abc041a683c34ebbbfad2 Fix for issue# 8459. isTrusted and isSafelyCallable have been removed. isSafe now checks for both @safe and @trusted again (but correctly now). https://github.com/D-Programming-Language/phobos/commit/0a5c88daf3e0d552f1296095e80564d016474018 Merge pull request #726 from jmdavis/traits Fix for issue# 8459.