Bug 6541 – using synchronized on a templated method crashes the compiler

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-08-20T19:06:06Z
Last change time
2019-04-22T21:45:30Z
Keywords
pull
Assigned to
No Owner
Creator
wolfwood

Attachments

IDFilenameSummaryContent-TypeSize
1019test.da testcase for compiling a static synchronized methodtext/x-dsrc204

Comments

Comment #0 by transmethyl+dmd — 2011-08-20T19:06:06Z
Created attachment 1019 a testcase for compiling a static synchronized method seems related to issue 5664, but not as trivial a fix. attached code show how a normal static synchronized method compiles just fine, but a templated version fails.
Comment #1 by dlang-bot — 2019-04-19T14:49:33Z
@SSoulaimane updated dlang/dmd pull request #9647 "Make `toParentDecl()` follow the declaration scope even for static templates" fixing this issue: - Close issue 6541 https://github.com/dlang/dmd/pull/9647
Comment #2 by dlang-bot — 2019-04-22T21:45:30Z
dlang/dmd pull request #9647 "Move `toParentDecl` to `toParentLocal` and make a new `toParentDecl()` which follows the declaration scope even for static templates" was merged into master: - 5a59d3b441ceeaf33ad06cb0069d5b910f411eb0 by سليمان السهمي (Suleyman Sahmi): Close issue 6541 https://github.com/dlang/dmd/pull/9647