Merge pull request #8364 from FeepingCreature/fix/issue-22701-remove-is-typeof-in-apply

Fix issue 22701: Remove is(typeof()) callable check in std.typecons.apply.
This commit is contained in:
Razvan Nitu 2022-01-29 12:00:05 +02:00 committed by GitHub
commit 896b1d0e1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4042,7 +4042,7 @@ template apply(alias fun)
import std.functional : unaryFun;
auto apply(T)(auto ref T t)
if (isInstanceOf!(Nullable, T) && is(typeof(unaryFun!fun(T.init.get))))
if (isInstanceOf!(Nullable, T))
{
alias FunType = typeof(unaryFun!fun(T.init.get));