www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8609] New: A forward reference error with static arrays

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

           Summary: A forward reference error with static arrays
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This compiles with no errors:


struct Tuple(T) {
    T arg;
}
struct Foo {
    Bar b;
}
struct Bar {
    int x;
    Tuple!(Foo) spam() {
        return Tuple!(Foo)();
    }
}
void main() {}




While this gives a forward reference error:

struct Tuple(T) {
    T arg;
}
struct Foo {
    Bar b;
}
struct Bar {
    int x;
    Tuple!(Foo[1]) spam() {
        return Tuple!(Foo[1])();
    }
}
void main() {}


DMD 2.061alpha:

test.d(4): Error: struct test.Foo no size yet for forward reference
test.d(4): Error: struct test.Foo no size yet for forward reference
test.d(9): Error: template instance test.Tuple!(Foo[1u]) error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 02 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8609


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

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



https://github.com/D-Programming-Language/dmd/pull/1849

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




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/31496352d31c5c361178397f6559e09c275334d1
fix Issue 8609 - A forward reference error with static arrays

https://github.com/D-Programming-Language/dmd/commit/41fa521d09efc63cb62812ce54953c25b36c22e3


Issue 8609 - A forward reference error with static arrays

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


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: -------
Apr 07 2013