Per TDPL (p. 414 - 419), synchronized is supposed to be on classes, not functions. It specifically talks about how D makes all of a class' function synchronized or none of them, as well as how that affects member variables. However, dmd seems to currently only apply synchronized to functions. This should be illegal: class C { synchronized int foo() {return 42;} bool bar() {return false;} } But it compiles. As opposed to what it should be synchronized class C { int foo() {return 42;} bool bar() {return false;} }
https://github.com/D-Programming-Language/dmd/pull/3068
Part of TLBB: http://forum.dlang.org/thread/lg383f$2mod$1@digitalmars.com
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18432 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB