382 – Critical "Previous definition different" bug

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 382 - Critical "Previous definition different" bug
Summary: Critical "Previous definition different" bug
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P1 blocker
Assignee: Walter Bright
URL:
Keywords: link-failure
Depends on:
Blocks:
Reported: 2006年09月27日 14:57 UTC by Boris Kolar
Modified: 2014年02月15日 13:22 UTC (History)
1 user (show)

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 Boris Kolar 2006年09月27日 14:57:23 UTC
Steps to reproduce:
1. Create 2 files (Site.d and Tools.d):
[Site.d]
module Site;
import Tools;
void test(List!(char) list) {}
[Tools.d]
module Tools;
struct List(T) {
	interface A {}
}
int main(char[][] args) {
	List!(char) list;
	return 0;
}
2. Now compile using the following commands:
# dmd.exe -c Site.d
# dmd.exe -c Tools.d
# dmd.exe bug.exe Site.obj Tools.obj
... should report error "Previous definition different"
I market this bug as blocker, because I know of no workaround (at least one that would work with compiling files one by one).
Comment 1 Stewart Gordon 2006年09月27日 15:58:32 UTC
So the error message is just "Previous definition different" with no indication of what or where???
Comment 2 Boris Kolar 2006年09月28日 05:15:03 UTC
Full compiler output:
# dmd.exe -v -c Site.d
parse Site
semantic Site
semantic2 Site
semantic3 Site
code Site
generating code for function 'test'
# dmd.exe -v -c Tools.d
parse Tools
semantic Tools
semantic2 Tools
semantic3 Tools
code Tools
generating code for function 'main'
# dmd.exe -v bug.exe Site.obj Tools.obj
C:\Home\Programs\D\dmd\bin\..\..\dm\bin\link.exe Site+Tools,Bug.exe,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
 
Tools.obj(Tools) Offset 00178H Record Type 0091 
 Error 1: Previous Definition Different : __Interface_5Tools11__T4ListTaZ4List1A
--- errorlevel 1
Comment 3 Walter Bright 2006年10月10日 03:28:30 UTC
Fixed DMD 0.169


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