Bug 1819 – spurious warning about missing return statement after synchronized

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2008-02-07T15:41:00Z
Last change time
2015-06-09T01:31:18Z
Assigned to
bugzilla
Creator
andrei

Comments

Comment #0 by andrei — 2008-02-07T15:41:12Z
In std.thread, the following code can't compile with warnings: static Thread[] getAll() { synchronized (Thread.classinfo) return allThreads[0 .. allThreadsDim]; } The compiler complains that there is no return at the end of the function. This warning should be removed because all paths inside synchronized do return.
Comment #1 by bugzilla — 2008-03-07T00:27:42Z
Fixed dmd 1.028 and 2.012