[Issue 16667] New: dub test fails on std.conv after upgrade to dmd 2.0.72.0

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Nov 7 07:22:12 PST 2016


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

          Issue ID: 16667
           Summary: dub test fails on std.conv after upgrade to dmd
                    2.0.72.0
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: igor.khasilev at gmail.com

igor@ ~/test$ dmd --version
DMD64 D Compiler v2.072.0
Copyright (c) 1999-2016 by Digital Mars written by Walter Bright
igor@ ~/test$ dub --version
DUB version 1.0.0, built on Oct 31 2016

To reproduce:
1. create empty dub package with "dub init"
2. change source/app.d to:

import std.conv;
import std.string;

void main()
{
}
unittest {
    ubyte[] a = "abc".representation.dup;
    string  s = castFrom!(ubyte[]).to!(string)(a);
}
3. dub test produce next output:

No source files found in configuration 'library'. Falling back to "dub -b
unittest".
Performing "unittest" build using dmd for x86_64.
test ~master: building configuration "application"...
/usr/include/dmd/phobos/std/conv.d(5574,42): Error: @safe function
'std.conv.castFrom!(ubyte[]).__unittestL5557_1926' cannot call @system function
'std.conv.castFrom!long.to!(int, long).to'
/usr/include/dmd/phobos/std/conv.d(5586,45): Error: @safe function
'std.conv.castFrom!(ubyte[]).__unittestL5557_1926' cannot call @system function
'std.conv.castFrom!(long*).to!(int, long*).to'
source/app.d(9,17): Error: template instance std.conv.castFrom!(ubyte[]) error
instantiating
/usr/include/dmd/phobos/std/conv.d(5574,42): Error: @safe function
'std.conv.castFrom!long.__unittestL5557_1927' cannot call @system function
'std.conv.castFrom!long.to!(int, long).to'
/usr/include/dmd/phobos/std/conv.d(5586,45): Error: @safe function
'std.conv.castFrom!long.__unittestL5557_1927' cannot call @system function
'std.conv.castFrom!(long*).to!(int, long*).to'
/usr/include/dmd/phobos/std/conv.d(5574,22): Error: template instance
std.conv.castFrom!long error instantiating
source/app.d(9,17):        instantiated from here: castFrom!(ubyte[])
/usr/include/dmd/phobos/std/conv.d(5586,45): Error: @safe function
'std.conv.castFrom!(long*).__unittestL5557_1928' cannot call @system function
'std.conv.castFrom!(long*).to!(int, long*).to'
/usr/include/dmd/phobos/std/conv.d(5586,22): Error: template instance
std.conv.castFrom!(long*) error instantiating
source/app.d(9,17):        instantiated from here: castFrom!(ubyte[])
dmd failed with exit code 1.

--


More information about the Digitalmars-d-bugs mailing list