Bug 240 – No file or line information in error message "cannot implicitly convert expression (-1) of type ulong to double"

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-07-05T17:30:00Z
Last change time
2014-02-15T13:21:46Z
Assigned to
bugzilla
Creator
digitalmars-com

Comments

Comment #0 by digitalmars-com — 2006-07-05T17:30:16Z
The error message from compiling the following code does not give any file or line information. In large projects, not having the file and line information makes finding the error difficult. Code: void main() { double maxValue = ulong.max; } Command: dmd tmp.d Output: cannot implicitly convert expression (-1) of type ulong to double
Comment #1 by thomas-dloop — 2006-07-12T09:12:38Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Derek Parnell schrieb am 2006-07-07: > > On Thu, 6 Jul 2006 23:10:58 +0200, Thomas Kuehne wrote: > >> [email protected] schrieb am 2006-07-05: >>> http://d.puremagic.com/issues/show_bug.cgi?id=240 >> >>> The error message from compiling the following code does not give any >>> file or line information. In large projects, not having the file and >>> line information makes finding the error difficult. >>> >>> Code: >>> void main() { >>> double maxValue = ulong.max; >>> } >>> >>> Command: >>> dmd tmp.d >>> >>> Output: >>> cannot implicitly convert expression (-1) of type ulong to double >> >> Can anybody reproduce this issue? DMD-0.162 on Linux behaved as expected >> and didn't produce any error messages. > > Problem in Windows environment (Win XP SP2) ... > > c:\temp>type test1.d > void main() { > double maxValue = ulong.max; > } > > c:\temp>dmd test1.d > cannot implicitly convert expression (-1) of type ulong to double > > c:\temp>dmd > Digital Mars D Compiler v0.162 > Copyright (c) 1999-2006 by Digital Mars written by Walter Bright > > c:\temp> Added to DStress as http://dstress.kuehne.cn/run/d/double_30_A.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEtPVmLK5blCcjpWoRAo16AKCScdyqWIT5ovM7ejyd7arwguiSjQCfUlUs wHvTY9K2prVlysWsrYsl8tk= =+SdF -----END PGP SIGNATURE-----
Comment #2 by jpelcis — 2006-07-18T16:39:40Z
Fixed DMD 0.163.