diff --git a/compiler/src/dmd/expressionsem.d b/compiler/src/dmd/expressionsem.d index e1baa4887e..c522095cc9 100644 --- a/compiler/src/dmd/expressionsem.d +++ b/compiler/src/dmd/expressionsem.d @@ -7130,6 +7130,11 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor { printf("TypeidExp::semantic() %s\n", exp.toChars()); } + if (exp.type) + { + result = exp; + return; + } Type ta = isType(exp.obj); Expression ea = isExpression(exp.obj); Dsymbol sa = isDsymbol(exp.obj); diff --git a/compiler/test/compilable/test19227.d b/compiler/test/compilable/test19227.d index 6ff5349f33..55fa59164f 100644 --- a/compiler/test/compilable/test19227.d +++ b/compiler/test/compilable/test19227.d @@ -1,9 +1,7 @@ // https://issues.dlang.org/show_bug.cgi?id=19227 /* TEST_OUTPUT: --- -compilable/test19227.d(18): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead -Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead -Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead +compilable/test19227.d(16): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead --- */