← Back to index
|
Original Bugzilla link
Bug 8286 – Type resolution issue during extra inlining semantic
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-23T03:02:00Z
Last change time
2013-11-24T20:19:37Z
Keywords
ice
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2012-06-23T03:02:35Z
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.
Comment #1
by k.hara.pg — 2013-11-24T20:19:37Z
With 2.060 release, no longer ICEs. And 2.062 and later, the OP code compiles successfully.