| Thread overview |
|---|
September 26, 2015 Bug or feature storage class alias | ||||
|---|---|---|---|---|
| ||||
Is this a bug or a feature
---
import std.stdio;
int global;
alias cGlobal = const global;
alias sGlobal = shared global;
void main()
{
global = 5;
writeln(cGlobal);
global = 7;
writeln(sGlobal);
}
---
| ||||
September 26, 2015 Re: Bug or feature storage class alias | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Freddy | On Saturday, 26 September 2015 at 20:27:03 UTC, Freddy wrote:
> Is this a bug or a feature
I forgot to show that sGlobal is writable
| |||
September 26, 2015 Re: Bug or feature storage class alias | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Freddy | On Saturday, 26 September 2015 at 20:27:03 UTC, Freddy wrote:
> Is this a bug or a feature
Wait nevermind me, the compiler ignores those storage classes if the alias is to a symbol.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply