Bug 2703 – Duplicate constructors and methods

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2009-03-01T21:39:00Z
Last change time
2014-02-24T15:33:37Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
z_hossain
Depends on
2789

Comments

Comment #0 by z_hossain — 2009-03-01T21:39:04Z
This code should not compiled without any complain. class C { this(int t) {;} this() {;} this() {;} } void main() { new C(0); }
Comment #1 by gide — 2009-03-02T10:03:30Z
Probably not just a duplicate ctor problem, as the following code also compiles without error and fails on linking. class C { void test() {} void test() {} } void main() { } C:> dmd -c test.d C:> dmd test.d OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. test.obj(test) Offset 002E1H Record Type 00C3 Error 1: Previous Definition Different : _D4test1C5helloMFZv test.obj(test) Offset 0031FH Record Type 00C3 Error 1: Previous Definition Different : _D4test1C2t2MFiZv --- errorlevel 2
Comment #2 by yebblies — 2011-06-10T09:15:14Z
*** This issue has been marked as a duplicate of issue 1003 ***