diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index bf9a1f9a18f9..1b387999da2f 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -412,8 +412,9 @@ void Compiler::lvaInitThisPtr(InitVarDscInfo* varDscInfo) } else { - varDsc->lvType = TYP_REF; - lvaSetClass(varDscInfo->varNum, info.compClassHnd); + const bool isExact = (info.compFlags & CORINFO_FLG_CONSTRUCTOR) != 0; + varDsc->lvType = TYP_REF; + lvaSetClass(varDscInfo->varNum, info.compClassHnd, isExact); } if (tiVerificationNeeded)