[Issue 21670] New: [REG 2.095] Public alias to private function triggers a deprecaton
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 1 00:39:56 UTC 2021
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 at puremagic.com
Reporter: pro.mathias.lang at 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
```
--
More information about the Digitalmars-d-bugs
mailing list