Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 136 - Struct hidden context pointers
Summary: Struct hidden context pointers
Status: RESOLVED INVALID
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: development
Hardware: All All
: --- normal
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2014-06-14 13:18 CEST by Iain Buclaw
Modified: 2016-09-17 08:12 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Buclaw 2014-06-14 13:18:52 CEST
Keeping a record of this:

http://forum.dlang.org/thread/20130706211329.GA17171@quickfur.ath.cx

---
// Function to test if T is independently instantiable.
void f(T)() {
    T t;
}

void main() {
    int a = 42;
    struct S {
        int y;
        bool f() { return (a == 42); }
    }

    f!S();
}
---
Comment 1 Iain Buclaw 2014-06-14 13:19:13 CEST
To decide whether or not this is actually a bug.
Comment 2 Iain Buclaw 2016-09-17 08:12:47 CEST
This is still reported as a compiler error.  And I can only agree that it should stay that way looking back at it a couple years on.