Bug 5824 – Linking of objs containing mixin and function literal fails

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-04-09T07:41:00Z
Last change time
2012-12-18T22:00:59Z
Assigned to
nobody
Creator
youxkei

Comments

Comment #0 by youxkei — 2011-04-09T07:41:05Z
Linking of objs fails when I compile two source codes into two .obj files and link two objs. main.d: module main; import hoge; void main(){} hoge.d: module hoge; int foo(alias func)(){ return func(13); } mixin(` int bar(){ return foo!(function(int i){ return i; })(); } `); enum int foobar = bar(); command: dmd -c main.d dmd -c hoge.d dmd main.obj hoge.obj Error message: OPTLINK (R) for Win32 Release 8.00.8 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html hoge.obj(hoge) Offset 00238H Record Type 00C3 Error 1: Previous Definition Different : _D4hoge3barFZi14__funcliteral3FiZi --- errorlevel 1
Comment #1 by lovelydear — 2012-04-23T09:02:10Z
This example compiles and links with no error on 2.059 Win32.