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



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



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




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


[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




Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/84fb9408789b0d34faaaec63c58dab31489bbcd7


[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