digitalmars.D.bugs - [Issue 16630] New: Compile errors with std.traits.arity and
- via Digitalmars-d-bugs (50/50) Oct 20 2016 https://issues.dlang.org/show_bug.cgi?id=16630
https://issues.dlang.org/show_bug.cgi?id=16630 Issue ID: 16630 Summary: Compile errors with std.traits.arity and std.traits.ParameterStorageClassTuple Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: goldmax3000 gmail.com This code import std.traits; class X { property auto prop() const { struct Iter {} return Iter(); } } pragma(msg, ParameterStorageClassTuple!(X.prop)); gives compile error: /opt/compilers/dmd2/include/std/traits.d(1016): Error: string slice [1 .. 0] is out of bounds /opt/compilers/dmd2/include/std/traits.d(1016): Error: string slice [1 .. 0] is out of bounds /d57/f615.d(11): Error: template instance std.traits.ParameterStorageClassTuple!(prop) error instantiating /d57/f615.d(11): while evaluating pragma(msg, ParameterStorageClassTuple!(prop)) Similar error with pragma(msg, arity!(X.prop)); /opt/compilers/dmd2/include/std/traits.d(1699): Error: string index 0 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1699): Error: string index 0 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1751): Error: template instance std.traits.functionLinkage!() error instantiating /opt/compilers/dmd2/include/std/traits.d(970): instantiated from here: variadicFunctionStyle!(prop) /opt/compilers/dmd2/include/std/traits.d(1756): Error: string index 18446744073709551593 is out of bounds [0 .. 0] /opt/compilers/dmd2/include/std/traits.d(1756): Error: array index -23 is out of bounds [0..0] /d112/f0.d(11): while looking for match for arity!(prop) /d112/f0.d(11): while evaluating pragma(msg, arity!(prop)) --
Oct 20 2016