[Issue 14430] New: Null parameter is detected as non-null.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 9 08:10:38 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14430
Issue ID: 14430
Summary: Null parameter is detected as non-null.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: 14crgg+ekargo2d7qijk at sharklasers.com
What:
I defined a class with a single method in it. Method has 6 parameters. Other
than first parameter, all others has default value. 3rd, 4th, and 5th
parameters are string and their default value is "null".
I create an instance of that class, and call that method 2 times with only
first parameter.
Expected:
Parameters those have "null" value by default should be "null" always.
Result:
In the first call, it works correctly. In the second and later calls, assert
doesn't pass, and it says those parameters are not null.
Test:
Tested on both "DMD64 D Compiler v2.066 and v2.070 on Archlinux" and "DMD64 D
Compiler v2.070 on Ubuntu 14.04". Results are same.
rdmd test.d
One person reported it works correctly on LDC and rdmd test.d on Archlinux. But
says that with "dmd -O", and "dmd -release", it works wrong as well.
This problem can be generated repeatedly.
--
More information about the Digitalmars-d-bugs
mailing list