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.