www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10101] New: static if conditional cannot be at global scope using mixin template

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10101

           Summary: static if conditional cannot be at global scope using
                    mixin template
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kyfolee gmail.com


--- Comment #0 from Kyle Foley <kyfolee gmail.com> 2013-05-16 22:38:50 EDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 16 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10101


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-05-17 23:43:11 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2049

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10101



--- Comment #2 from github-bugzilla puremagic.com 2013-05-18 17:25:52 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10101



--- Comment #3 from github-bugzilla puremagic.com 2013-05-18 17:27:08 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10101


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013