[Issue 16239] New: is(typeof(foo)) hides deprecation message about foo

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 5 08:09:47 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16239

          Issue ID: 16239
           Summary: is(typeof(foo)) hides deprecation message about foo
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

Spin-off from issue 16238.

----
void main() { startsWith!funTemplate(); }
enum e = is(typeof(funTemplate()));
void startsWith(alias pred)() { pred(); }
void funTemplate()() { fun(); }
deprecated void fun() {}
----

dmd does not print a deprecation message about fun here. If the e line is
removed, the message gets printed.

When compiling with -de, the deprecation message becomes visible and
compilation fails.

--


More information about the Digitalmars-d-bugs mailing list