https://issues.dlang.org/show_bug.cgi?id=17138
--- Comment #5 from Eyal <e...@weka.io> --- Another case that is beneficial and should not be an error: If the expression results in an object that scopes over the block and has a destructor. Example: with(someMutex.acquired) { // No use of any fields from the MutexAcquired object } // dtor of MutexAcquired called here, releasing the mutex So here you'd want no error either. --