Bug 10101 – static if conditional cannot be at global scope using mixin template

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-16T19:38:00Z
Last change time
2015-06-17T21:03:28Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
kyfolee

Comments

Comment #0 by kyfolee — 2013-05-16T19:38:50Z
windows DMD32 2.063 beta2 The following compiles in 2.062 but breaks in 2.063 beta2 --- int front(int); mixin template reflectRange() { static if ( is( typeof(this.front) ) ) { } } struct S(R) { R r_; typeof(r_.front) front() @property { return r_.front; } mixin reflectRange; } void main() { S!(int) s; } --- .\static_if.d(5): Error: static if conditional cannot be at global scope .\static_if.d(14): Error: mixin static_if.S!(int).S.reflectRange!() error instantiating .\static_if.d(18): Error: template instance static_if.S!(int) error instantiating
Comment #1 by k.hara.pg — 2013-05-17T23:43:11Z
Comment #2 by github-bugzilla — 2013-05-18T17:25:52Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0f7c26f8375fbb6132a708ce174fac775c208eed fix Issue 10101 - static if conditional cannot be at global scope using mixin template https://github.com/D-Programming-Language/dmd/commit/31c15f33d71675c1daa1fdb05d8fa699074aa33f Merge pull request #2049 from 9rnsr/fix10101 [REG2.063a] Issue 10101 - static if conditional cannot be at global scope using mixin template
Comment #3 by github-bugzilla — 2013-05-18T17:27:08Z
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/84fb9408789b0d34faaaec63c58dab31489bbcd7 Merge pull request #2049 from 9rnsr/fix10101 [REG2.063a] Issue 10101 - static if conditional cannot be at global scope using mixin template
Comment #4 by github-bugzilla — 2015-03-30T06:10:41Z
Comment #5 by github-bugzilla — 2015-06-17T21:03:28Z