diff --git a/compiler/src/dmd/expressionsem.d b/compiler/src/dmd/expressionsem.d index 55dd4dd3880d..83d7fc23d593 100644 --- a/compiler/src/dmd/expressionsem.d +++ b/compiler/src/dmd/expressionsem.d @@ -6932,17 +6932,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor // Handle this in the glue layer e = new TypeidExp(exp.loc, ta); - bool genObjCode = true; - - // https://issues.dlang.org/show_bug.cgi?id=23650 - // We generate object code for typeinfo, required - // by typeid, only if in non-speculative context - if (sc.flags & SCOPE.compile) - { - genObjCode = false; - } - - e.type = getTypeInfoType(exp.loc, ta, sc, genObjCode); + e.type = getTypeInfoType(exp.loc, ta, sc); semanticTypeInfo(sc, ta); if (ea) diff --git a/compiler/src/dmd/frontend.h b/compiler/src/dmd/frontend.h index 0534b64385d4..9c05ccaa4454 100644 --- a/compiler/src/dmd/frontend.h +++ b/compiler/src/dmd/frontend.h @@ -7784,7 +7784,7 @@ extern bool tpsemantic(TemplateParameter* tp, Scope* sc, Array