Thread overview
[Issue 8609] New: A forward reference error with static arrays
Apr 06, 2013
Kenji Hara
Apr 07, 2013
Walter Bright
September 02, 2012
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


--- Comment #0 from bearophile_hugs@eml.cc 2012-09-02 12:16:00 PDT ---
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: -------
April 06, 2013
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


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-04-06 01:30:32 PDT ---
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: -------
April 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8609



--- Comment #2 from github-bugzilla@puremagic.com 2013-04-07 00:10:32 PDT ---
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 Merge pull request #1849 from 9rnsr/fix8609

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: -------
April 07, 2013
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: -------