Bug 21269 – ReplaceType on function type does not compile with -betterC

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-09-22T13:06:17Z
Last change time
2023-01-15T07:02:57Z
Keywords
betterC
Assigned to
No Owner
Creator
Paul Backus

Comments

Comment #0 by snarwin+bugzilla — 2020-09-22T13:06:17Z
Example: --- import std.typecons: ReplaceType; alias F = ReplaceType!(int, double, int function()); --- Compiler output: --- /dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d(8958): Error: TypeInfo cannot be used with -betterC --- The cause of this error is the private helper template replaceTypeInFunctionTypeUnless, which uses the `~=` operator in CTFE. Due to issue 19268, this causes compilation to fail.
Comment #1 by bugzilla — 2023-01-15T07:02:57Z
This is working now with master.