https://issues.dlang.org/show_bug.cgi?id=14878
Martin Nowak <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Martin Nowak <[email protected]> --- (In reply to Kenji Hara from comment #1) > Following static asserts work as you expects. > > static assert(!__traits(compiles, (T b) @safe {})); > static assert(!is(typeof((T b) @safe {}))); I'm sure I tried that, but apparently not on both at the same time ;). It didn't occur to me though that `(T) @safe {}` was parsed as polymorphic lambda with `T` being the parameter's name. --
