D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6541 - using synchronized on a templated method crashes the compiler
Summary: using synchronized on a templated method crashes the compiler
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2011-08-20 19:06 UTC by wolfwood
Modified: 2019-04-22 21:45 UTC (History)
1 user (show)

See Also:


Attachments
a testcase for compiling a static synchronized method (204 bytes, text/x-dsrc)
2011-08-20 19:06 UTC, wolfwood
Details

Note You need to log in before you can comment on or make changes to this issue.
Description wolfwood 2011-08-20 19:06:06 UTC
Created attachment 1019 [details]
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 Dlang Bot 2019-04-19 14:49:33 UTC
@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 Dlang Bot 2019-04-22 21:45:30 UTC
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