[Issue 21269] New: ReplaceType on function type does not compile with -betterC
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 22 13:06:17 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21269
Issue ID: 21269
Summary: ReplaceType on function type does not compile with
-betterC
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: snarwin+bugzilla at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list