Bug 10144 – Using enum inside final class occurs weird errors

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-23T03:00:00Z
Last change time
2013-05-24T01:47:16Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-05-23T03:00:38Z
Test casse: final class TNFA(char_t) { enum Act { don } // line 15 const Act[] action_lookup1 = [ Act.don, ]; } alias X = TNFA!char; // lien 18 output: test.d(15): Error: variable test.TNFA!(char).TNFA.don final cannot be applied to variable, perhaps you meant const? test.d(18): Error: template instance test.TNFA!(char) error instantiating
Comment #1 by k.hara.pg — 2013-05-23T21:04:27Z
Comment #2 by github-bugzilla — 2013-05-24T01:45:51Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4460aee4175a73fc8260a57427cc0c83d3989d55 fix Issue 10144 - Using enum inside final class occurs weird errors An enum and static variable declaration should not be affected by `synchronized`, `override`, `abstract`, and `final` attributes. https://github.com/D-Programming-Language/dmd/commit/40235541e742e245b50b7fc8f1a3e8ce5094d398 Merge pull request #2070 from 9rnsr/fix10144 [REG2.063a] Issue 10144 - Using enum inside final class occurs weird errors
Comment #3 by github-bugzilla — 2013-05-24T01:46:41Z
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/755ecc5c6237860a44c4fa4eac40c8adf1d9e884 Merge pull request #2070 from 9rnsr/fix10144 [REG2.063a] Issue 10144 - Using enum inside final class occurs weird errors