[Issue 8286] New: Type resolution issue during extra inlining semantic

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 23 03:00:14 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8286

           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 at puremagic.com
        ReportedBy: code at klickverbot.at


--- Comment #0 from klickverbot <code at 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
well:

--- 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() {
        assert(0);
    }

    @property size_t length() {
        assert(0);
    }
}
---

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
AggregateDeclaration::semantic3.

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


More information about the Digitalmars-d-bugs mailing list