Bug 211 – Linking error with alias mixin params and anonymous methods

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-06-19T10:46:00Z
Last change time
2014-02-15T13:20:02Z
Keywords
link-failure
Assigned to
bugzilla
Creator
h3r3tic

Comments

Comment #0 by h3r3tic — 2006-06-19T10:46:33Z
// tmp7.d: template Foo(alias f) { } class Bar { mixin Foo!( function {} ); } void main() { } // result: D:\WINDOWS\system32\cmd.exe /c dmd tmp7.d d:\coding\dmd\bin\..\..\dm\bin\link.exe tmp7,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved tmp7.obj(tmp7) Error 42: Symbol Undefined _D4tmp73Bar14__funcliteral1FZv
Comment #1 by thomas-dloop — 2007-01-01T04:25:27Z
test cases: http://dstress.kuehne.cn/run/m/mixin_23_A.d http://dstress.kuehne.cn/run/m/mixin_23_B.d http://dstress.kuehne.cn/run/m/mixin_23_C.d http://dstress.kuehne.cn/run/m/mixin_23_D.d Currently (DMD-0.178) those test cases cause on Linux the compile time message: run/m/mixin_23_A.d(19): delegate dstress.run.m.mixin_23_A.C.__dgliteral1 literals cannot be class members
Comment #2 by bugzilla — 2008-07-09T22:30:56Z
Fixed dmd 1.032 and 2.016
Comment #3 by h3r3tic — 2008-07-10T07:29:21Z
Thanks, but the following code still breaks: // --- template Foo(alias f) { void foo() { f(); } } class Bar { mixin Foo!( function { } ); } void main() {} // --- dmd issue211.d && issue211 OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. issue211.obj(issue211) Error 42: Symbol Undefined _D8issue2113Bar14__funcliteral1MFZv I hope it's fine to reopen the issue. I can submit a new one if that's not a good option ;)
Comment #4 by bugzilla — 2008-07-12T00:36:40Z
If the original test case works now, then it is a new bug and should be filed as such.
Comment #5 by h3r3tic — 2008-07-12T02:32:35Z
Ok, sorry then. I've opened issue 2220.