www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21670] New: [REG 2.095] Public alias to private function

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

          Issue ID: 21670
           Summary: [REG 2.095] Public alias to private function triggers
                    a deprecaton
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: industry, rejects-valid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

This triggers a deprecation n v2.095.1:
```
// File: a.d
module a;
private string csiSeq (string value) ()
{
    return value;
}
public alias csiSeq!("SEQ") up;

// File: b.d
module b;
import a;
void main ()
{
    string s = up;
}
```

Running `~/dlang/dmd-2.094.0/osx/bin/dmd -i b.d` pass without message.
Using v2.095.1 however:
```
b.d(5): Deprecation: Function a.csiSeq!"SEQ".csiSeq of type pure nothrow  nogc
 safe string() is not accessible from module b
```

--
Feb 28