Bug 18479 – does not match template declaration: syntax highlight error and enum not symbolized

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2018-02-20T21:55:37Z
Last change time
2020-10-10T00:12:16Z
Assigned to
No Owner
Creator
Timothee Cour

Comments

Comment #0 by timothee.cour2 — 2018-02-20T21:55:37Z
/Users/timothee/git_clone/D/dcv/source/dcv/core/utils.d(65,13): Error: template instance `Slice!(cast(SliceKind)2, [1], IotaIterator)` does not match template declaration Slice(SliceKind kind, ulong[] packs, Iterator) if (packs.sum < 255 && !(kind == Canonical && (packs == [1]))) 2 annoyances: * `Slice!(cast(SliceKind)2, [1], IotaIterator)` is not syntax highlighted somehow (unlike `Slice(SliceKind kind, ulong[] packs, Iterator) if (packs.sum < 255 && !(kind == Canonical && (packs == [1])))` which gets highlighted) * cast(SliceKind)2 should be converted to its symbolic representation (as is case for Canonical in kind == Canonical)
Comment #1 by timothee.cour2 — 2018-02-20T22:05:54Z
NOTE: for context here's the enum: ``` enum SliceKind { /// A slice has strides for all dimensions. universal, /// A slice has >=2 dimensions and row dimension is contiguous. canonical, /// A slice is a flat contiguous data without strides. contiguous, } ``` I'd expect to see: s/cast(SliceKind)2/contiguous or even better, SliceKind.contiguous
Comment #2 by pro.mathias.lang — 2020-10-10T00:12:16Z
The syntax highlight thing is fixed, and the enum thing is a duplicate of 8044 for which I just opened a PR. *** This issue has been marked as a duplicate of issue 8044 ***