Bug 11198 – Error messages for declaring a 'version' inside main() and other functions are unclear

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-08T10:16:00Z
Last change time
2015-06-09T05:15:24Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
dlangbugad

Comments

Comment #0 by dlangbugad — 2013-10-08T10:16:44Z
Declaring a version for conditional compilation within functions gives the following errors: Error: (condition) expected following version Error: found '=' instead of statement when using code such as `version = FeatureA;` in a function. The errors do not specify that a version must be declared outside of function code blocks.
Comment #1 by yebblies — 2013-11-13T23:27:16Z
Comment #2 by github-bugzilla — 2013-11-14T08:57:46Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/96a0a4090ccd7bf157ac6c85c911fe6398890dbe Fix Issue 11198 - Error messages for declaring a 'version' inside main() and other functions are unclear https://github.com/D-Programming-Language/dmd/commit/71a79f3568aea708776678cbe473fa56dcde518f Merge pull request #2760 from yebblies/issue11198 Issue 11198 - Error messages for declaring a 'version' inside main() and other functions are unclear