211 – Linking error with alias mixin params and anonymous methods

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 211 - Linking error with alias mixin params and anonymous methods
Summary: Linking error with alias mixin params and anonymous methods
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL:
Keywords: link-failure
Depends on:
Blocks:
Reported: 2006年06月19日 10:46 UTC by Tomasz Stachowiak
Modified: 2014年02月15日 13:20 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Tomasz Stachowiak 2006年06月19日 10:46:33 UTC
// 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 Thomas Kühne 2007年01月01日 04:25:27 UTC
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 Walter Bright 2008年07月09日 22:30:56 UTC
Fixed dmd 1.032 and 2.016
Comment 3 Tomasz Stachowiak 2008年07月10日 07:29:21 UTC
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 Walter Bright 2008年07月12日 00:36:40 UTC
If the original test case works now, then it is a new bug and should be filed as such.
Comment 5 Tomasz Stachowiak 2008年07月12日 02:32:35 UTC
Ok, sorry then. I've opened issue 2220.


AltStyle によって変換されたページ (->オリジナル) /