Bug 16383 – Algebraic visit does not match handlers to const classes

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-08-13T17:43:00Z
Last change time
2016-10-01T11:46:35Z
Assigned to
nobody
Creator
cauterite

Comments

Comment #0 by cauterite — 2016-08-13T17:43:14Z
( https://dpaste.dzfl.pl/e8709d95a4dc ) import std.variant; class C {}; void main() { alias T = Algebraic!(immutable(C)); T.init.visit!( (immutable(C) _) => 0 ); }; // error: "overload for type 'immutable(C)' hasn't been specified" const/immutable just don't get matched to the handlers. Probably related to bug 15615.
Comment #1 by cauterite — 2016-08-13T18:26:42Z
Comment #2 by github-bugzilla — 2016-08-19T12:49:33Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/90e7fd0ab4f227cbd965e85d85c1e01e39c4061f fix Issue 16383 - 'Algebraic visit does not match const' https://github.com/dlang/phobos/commit/a63348d8c2edc42bca3cddb974466f7a5d95b805 unittest for variant bug 16383 https://github.com/dlang/phobos/commit/0538d0ce15b51a4b97fc086e59230ba257995f3e Merge pull request #4727 from Cauterite/patch-1 fix Issue 16383 - 'Algebraic visit does not match const'
Comment #3 by github-bugzilla — 2016-10-01T11:46:35Z