Bug 8024 – Template alias parameter is fail to compile when -inline is used

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2012-05-03T05:07:59Z
Last change time
2022-08-16T11:25:45Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Leandro Lucarella
See also
http://d.puremagic.com/issues/show_bug.cgi?id=5499

Comments

Comment #0 by leandro.lucarella — 2012-05-03T05:07:59Z
--- 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 by razvan.nitu1305 — 2022-08-16T11:25:45Z
I cannot reproduce this with the latest master.