Bug 17689 – finally clause leaks declarations

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-26T00:17:33Z
Last change time
2017-08-16T13:23:51Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2017-07-26T00:17:33Z
The following code compiles and runs: void main(){ try{} finally int x=3; assert(x==3); } The problem is that the parser does not pass PSscope when parsing the statement for the finally clause.
Comment #1 by bugzilla — 2017-08-07T03:39:27Z
Comment #2 by github-bugzilla — 2017-08-07T20:34:40Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d3a39e3aaaf6c976c9a678524e2ecdee4ee63052 fix Issue 17689 - finally clause leaks declarations https://github.com/dlang/dmd/commit/cc3187d6f1e529b5db77098479a3d3091d70ffaa Merge pull request #7024 from tgehr/fix17689 fix Issue 17689 - finally clause leaks declarations merged-on-behalf-of: Rainer Schuetze <[email protected]>
Comment #3 by github-bugzilla — 2017-08-16T13:23:51Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d3a39e3aaaf6c976c9a678524e2ecdee4ee63052 fix Issue 17689 - finally clause leaks declarations https://github.com/dlang/dmd/commit/cc3187d6f1e529b5db77098479a3d3091d70ffaa Merge pull request #7024 from tgehr/fix17689