www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17471] New: deprecated("message") does not work inside function

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

          Issue ID: 17471
           Summary: deprecated("message") does not work inside function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Repro:

void main()
{
    deprecated("a") int x;
}

results in:

test.d(3): Error: basic type expected, not (
test.d(3): Error: unexpected ( in declarator
test.d(3): Error: basic type expected, not "a"
test.d(3): Error: found '"a"' when expecting ')'
test.d(3): Error: no identifier for declarator _error_(_error_)
test.d(3): Error: semicolon expected following function declaration
test.d(3): Error: found ')' instead of statement

--
Jun 06