D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10739 - Struct defined by template mixin leads to order-sensitivity of declarations
Summary: Struct defined by template mixin leads to order-sensitivity of declarations
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks: 340
  Show dependency treegraph
 
Reported: 2013-07-31 17:07 UTC by Stewart Gordon
Modified: 2019-05-25 06:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stewart Gordon 2013-07-31 17:07:18 UTC
Using DMD 2.063.

Not sure if this is related to bug 275 or some other.

----------
template DECLARE_HANDLE() {
    struct HINTERNET { int h; }
}

const INTERNET_INVALID_STATUS_CALLBACK = cast(INTERNET_STATUS_CALLBACK) -1;

mixin DECLARE_HANDLE;

alias void function(HINTERNET) INTERNET_STATUS_CALLBACK;
----------
C:\Users\Stewart\Documents\Programming\D\win32>dmd -c wininet.d
wininet.d(9): Error: undefined identifier HINTERNET
----------
Comment 1 Dlang Bot 2019-05-24 10:11:30 UTC
@RazvanN7 updated dlang/dmd pull request #9873 "Fix Issue 1170 - Cannot forward reference a type defined in a MixinStatement" fixing this issue:

- Fix Issue 1170 and 10739 - Cannot forward reference a type defined in a MixinStatement

https://github.com/dlang/dmd/pull/9873
Comment 2 Dlang Bot 2019-05-25 06:06:09 UTC
dlang/dmd pull request #9873 "Fix Issue 1170 - Cannot forward reference a type defined in a MixinStatement" was merged into master:

- 462fdccb04d93b37aebb02643253e281eb7e00e2 by RazvanN7:
  Fix Issue 1170 and 10739 - Cannot forward reference a type defined in a MixinStatement

https://github.com/dlang/dmd/pull/9873