www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20311] New: dtext("") == null

https://issues.dlang.org/show_bug.cgi?id=20311

          Issue ID: 20311
           Summary: dtext("") == null
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: porton narod.ru

import std.conv;
import std.stdio;

void main() {
    dstring s = dtext("");
    writeln(s == null);
}

///////////////////////

$ ldc2 x.d
$ ./x
true

Should output "false".

LDC - the LLVM D compiler (1.12.0):
  based on DMD v2.082.1 and LLVM 6.0.1
  built with LDC - the LLVM D compiler (1.12.0)
  Default target: x86_64-pc-linux-gnu
  Host CPU: goldmont

Package: libphobos2-ldc-shared82
Version: 1:1.12.0-1ubuntu1

on Ubuntu 19.04

--
Oct 22 2019