D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8024 - Template alias parameter is fail to compile when -inline is used
Summary: Template alias parameter is fail to compile when -inline is used
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-05-03 05:07 UTC by Leandro Lucarella
Modified: 2022-08-16 11:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Leandro Lucarella 2012-05-03 05:07:59 UTC
---
void foo(alias f)() {
    f();
}

void bar() {
        foo!({})();
}

void main() {
        bar();
}
---

dmd -inline -c m1.d
m1.d(1): Error: function m1.bar.foo!(delegate void()
{
}
).foo is a nested function and cannot be accessed from main

Pretty similar to bug 5499 but not the same as the failures are so different.
Comment 1 RazvanN 2022-08-16 11:25:45 UTC
I cannot reproduce this with the latest master.