www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8286] New: Type resolution issue during extra inlining semantic


           Summary: Type resolution issue during extra inlining semantic
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code klickverbot.at

--- Comment #0 from klickverbot <code klickverbot.at> 2012-06-23 03:02:35 PDT
This bug was originally reported by David Simcha as a LDC issue
(https://github.com/ldc-developers/ldc/issues/62), but it occurs with DMD as

--- a.d
import b;

--- b.d
import hash;

void fun() {
    alias StackSet!(string) SS;

--- hash.d
struct HashRange(K, S, ) {
    size_t _length;

    this(S* set) {
        this._length = set.length;

struct StackSet(K) {
    HashRange!(K, typeof(this)) elems() {

     property size_t length() {

With DMD 2.059, dmd -release -inline -noboundscheck a.d yields:
hash.d(5): Error: cannot implicitly convert expression ((*set).length()) of
type size_t to ulong
hash.d(11): Error: template instance hash.HashRange!(string,StackSet!(string))
error instantiating
b.d(4):        instantiated from here: StackSet!(string)
b.d(4): Error: template instance hash.StackSet!(string) error instantiating

With DMD 2.060 Git (ad7637f), it instead segfaults in

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 23 2012