Bug 7902 – [TDPL] sychronized is supposed to be for classes, not functions

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-13T21:20:33Z
Last change time
2024-12-13T17:59:27Z
Keywords
accepts-invalid, pull, safe, TDPL
Assigned to
Andrej Mitrovic
Creator
Jonathan M Davis
Moved to GitHub: dmd#18432 →

Comments

Comment #0 by issues.dlang — 2012-04-13T21:20:33Z
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;} }
Comment #1 by andrej.mitrovich — 2014-01-06T12:47:19Z
Comment #2 by andrei — 2014-03-15T21:14:39Z
Comment #3 by robert.schadek — 2024-12-13T17:59:27Z
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