regression from 2.073.2 (https://run.dlang.io/is/9fOvpM)
w/o phobos:
---
template isSomeFunction(T...)
if (T.length == 1)
{
static if (is(typeof(& T[0]) U : U*) && is(U == function) || is(typeof(& T[0]) U == delegate))
{
// T is a (nested) function symbol.
enum bool isSomeFunction = true;
}
else static if (is(T[0] W) || is(typeof(T[0]) W))
{
// T is an expression or a type. Take the type of it and examine.
static if (is(W F : F*) && is(F == function))
enum bool isSomeFunction = true; // function pointer
else
enum bool isSomeFunction = is(W == function) || is(W == delegate);
}
else
enum bool isSomeFunction = false;
}
struct MySerializer (T)
{
void serializeSinkType(T2) (scope auto ref T2 record) {}
}
template SupportSinkTypeSer(SerT)
{
enum SupportSinkTypeSer = isSomeFunction!(SerT.init.serializeSinkType!int);
}
int main()
{
enum x = SupportSinkTypeSer!(MySerializer!int);
return 0;
}
---
Comment #2 by feco.graczer — 2020-11-12T11:19:08Z
sorry, compiler was DMD v2.093.1 (with ldc2)
Comment #3 by dlang-bot — 2021-11-04T10:02:23Z
@BorisCarvajal created dlang/dmd pull request #13266 "Fix Issue 21380 - A case of compiler crash when using auto ref" fixing this issue:
- Fix Issue 21380 - A case of compiler crash when using auto ref
https://github.com/dlang/dmd/pull/13266
Comment #4 by dlang-bot — 2021-11-04T11:43:06Z
dlang/dmd pull request #13266 "Fix Issue 21380 - A case of compiler crash when using auto ref" was merged into stable:
- 64f1c197657eddc20597d0cf345e0314b8a7ba05 by Boris Carvajal:
Fix Issue 21380 - A case of compiler crash when using auto ref
https://github.com/dlang/dmd/pull/13266
Comment #5 by dlang-bot — 2021-11-08T20:45:40Z
dlang/dmd pull request #13279 "Merge `stable` into `master`" was merged into master:
- 0a9502c66713d2052ee5e9f3e0d188613d2ceca7 by Boris Carvajal:
Fix Issue 21380 - A case of compiler crash when using auto ref
https://github.com/dlang/dmd/pull/13279