www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Meaning of shared when its position is changed

reply "tcak" <tcak pcak.com> writes:
The following two function definitions. First one gives error, 
second one works. Can anyone tell me the difference between 
putting the "shared" keyword at the end of definition, and before 
static.

// this gives error message
// Error: semicolon expected following function declaration
private static this() shared{}


// this works correctly
private shared static this(){}


I didn't see any information about position of keywords in 
documentation.
Feb 13 2014
parent "bearophile" <bearophileHUGS lycos.com> writes:
tcak:

 I didn't see any information about position of keywords in 
 documentation.
It's a compiler bug. And it's in Bugzilla since some years. Bye, bearophile
Feb 13 2014