[Issue 17801] New: Date.fromISOExtString broken in 2.076 because of changed type specifier

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Sep 3 08:34:22 UTC 2017


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

          Issue ID: 17801
           Summary: Date.fromISOExtString broken in 2.076 because of
                    changed type specifier
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: neuranuz at gmail.com

After upgrading to DMD 2.076 the following code was broken, because of changed
type specifier:

import std.stdio;
import std.datetime;

DateTime DateTimeFromPGTimestamp( const(char)[] dateString )
{
    auto temp = dateString[0..10] ~ "T" ~ dateString[11..19];
    return DateTime.fromISOExtString(temp);
}


void main()
{
    auto result = DateTimeFromPGTimestamp("No matter what is there!");

}

Compilation output:
/opt/compilers/dmd2/include/std/datetime/date.d(3197): Error: cannot implicitly
convert expression `strip(isoExtString)` of type `const(char)[]` to
`immutable(string)`
/d578/f601.d(7): Error: template instance
std.datetime.date.DateTime.fromISOExtString!(char[]) error instantiating

Link to compile online:
https://dpaste.dzfl.pl/06c270576110

--


More information about the Digitalmars-d-bugs mailing list