[Issue 14564] New: dmd -property -unittest combination causes compiler error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 9 21:38:14 PDT 2015


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

          Issue ID: 14564
           Summary: dmd -property -unittest combination causes compiler
                    error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: ljdelight at gmail.com

I see the below errors when compiling a simple file using -property -unittest
argument combination. Using either one individually creates a functional
binary.

A simple main.d:
import std.stdio;
void main()
{
    writeln("Hello world");
}



>dmd -property -unittest ./main.d
/usr/include/dmd/phobos/std/uni.d(5736): Error: not a property c.isWhite
/usr/include/dmd/phobos/std/uni.d(5738): Error: not a property a.map!(toLower)
/usr/include/dmd/phobos/std/uni.d(5738): Error: not a property
map(a).filter!(pred)
/usr/include/dmd/phobos/std/uni.d(5739): Error: not a property b.map!(toLower)
/usr/include/dmd/phobos/std/uni.d(5739): Error: not a property
map(b).filter!(pred)
/usr/include/dmd/phobos/std/uni.d(6028): Error: template instance
std.uni.comparePropertyName!(char, char) error instantiating
/usr/include/dmd/phobos/std/algorithm/searching.d(1494):        instantiated
from here: __lambda2!string
/usr/include/dmd/phobos/std/uni.d(6028):        instantiated from here:
find!((x) => comparePropertyName(x, name) == 0, string[])
/usr/include/dmd/phobos/std/uni.d(6213):        instantiated from here:
isPrettyPropertyName!char
/usr/include/dmd/phobos/std/uni.d(5897): Error: template
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound cannot deduce
function from argument types !()(const(char[])), candidates are:
/usr/include/dmd/phobos/std/range/package.d(6942):       
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound(SearchPolicy
sp = SearchPolicy.binarySearch, V)(V value) if (isTwoWayCompatible!(predFun,
ElementType!Range, V) && hasSlicing!Range)
/usr/include/dmd/phobos/std/uni.d(6035): Error: template instance
std.uni.findUnicodeSet!(tab, char) error instantiating
/usr/include/dmd/phobos/std/uni.d(6214):        instantiated from here:
findSetName!(tab, char)
/usr/include/dmd/phobos/std/uni.d(5897): Error: template
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound cannot deduce
function from argument types !()(const(char[])), candidates are:
/usr/include/dmd/phobos/std/range/package.d(6942):       
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound(SearchPolicy
sp = SearchPolicy.binarySearch, V)(V value) if (isTwoWayCompatible!(predFun,
ElementType!Range, V) && hasSlicing!Range)
/usr/include/dmd/phobos/std/uni.d(6035): Error: template instance
std.uni.findUnicodeSet!(tab, char) error instantiating
/usr/include/dmd/phobos/std/uni.d(6214):        instantiated from here:
findSetName!(tab, char)
/usr/include/dmd/phobos/std/uni.d(5897): Error: template
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound cannot deduce
function from argument types !()(const(char[])), candidates are:
/usr/include/dmd/phobos/std/range/package.d(6942):       
std.uni.findUnicodeSet!(tab,
char).findUnicodeSet.SortedRange!(MapResult!(unaryFun,
immutable(UnicodeProperty)[]), __lambda2).SortedRange.lowerBound(SearchPolicy
sp = SearchPolicy.binarySearch, V)(V value) if (isTwoWayCompatible!(predFun,
ElementType!Range, V) && hasSlicing!Range)
/usr/include/dmd/phobos/std/uni.d(6035): Error: template instance
std.uni.findUnicodeSet!(tab, char) error instantiating
/usr/include/dmd/phobos/std/uni.d(6215):        instantiated from here:
findSetName!(tab, char)
/usr/include/dmd/phobos/std/uni.d(6114):        called from here:
findAny("Cyrillic")
/usr/include/dmd/phobos/std/uni.d(6117): Error: static assert  "No unicode set
by name Cyrillic was found."
/usr/include/dmd/phobos/std/uni.d(2236):        instantiated from here:
opDispatch!"Cyrillic"
/usr/include/dmd/phobos/std/uni.d(1853):        instantiated from here:
InversionList!(GcPolicy)

--


More information about the Digitalmars-d-bugs mailing list