Bug 6889 – "finally" mentioned in a compilation error, instead of "scope(exit)" or "scope(success)"

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-03T14:34:00Z
Last change time
2014-05-24T20:49:00Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
acehreli

Comments

Comment #0 by acehreli — 2011-11-03T14:34:53Z
The error message mentions "finally", instead of "scope(exit)": deneme.d(53539): Error: cannot put catch statement inside finally block The program to reproduce with dmd 2.056: void main() { scope(exit) try {} catch {} } Note that it is the same with scope(success).
Comment #1 by andrej.mitrovich — 2014-04-29T15:39:11Z
Yeah, this is caused by an internal rewrite of scope => try/catch/finally block.
Comment #2 by k.hara.pg — 2014-05-21T13:54:26Z
Comment #3 by github-bugzilla — 2014-05-24T20:48:56Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bb9fd7e2ad2c0fbc5ddd132129819fdcd2cc6bf0 fix Issue 6889 - "finally" mentioned in a compilation error, instead of "scope(exit)" or "scope(success)" https://github.com/D-Programming-Language/dmd/commit/75950518c1a448c85aa7e9db2033b09f4c377380 Merge pull request #3564 from 9rnsr/fix_onscope Issue 6889 & 2456 - Fix diagnostic messages for OnScomeStatement