www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14685] New: Silent incorrect behavior with enforce and custom


          Issue ID: 14685
           Summary: Silent incorrect behavior with enforce and custom
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

Today, I wrote the following code:

/////////////// test.d //////////////
import std.exception;

class NotFoundException : Exception
    this() { super("Not found"); }

void main()

It compiles fine, but does not actually throw anything.

This seems to be a regression, as previously it did not compile.

Introduced in https://github.com/D-Programming-Language/phobos/pull/2288

Jun 11 2015