@@ -617,12 +617,14 @@ module FSharpExprConvert =
617617 ConvExprPrim cenv env op
618618
619619 | TOp.ILAsm ([ I_ call ( Normalcall, mspec, None) ], _), _, [ arg]
620- when mspec.Name = " GetHashCode" ->
620+ when mspec.MethodRef.EnclosingTypeRef.Name = " System.String " && mspec. Name = " GetHashCode" ->
621621 let ty = tyOfExpr cenv.g arg
622622 let op = mkCallHash cenv.g m ty arg
623623 ConvExprPrim cenv env op
624624
625- | TOp.ILAsm([ I_ ldtoken ( ILToken.ILType _ ilty) ], _), [ ty], _ ->
625+ | TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), [],
626+ [ Expr.Op( TOp.ILAsm([ I_ ldtoken ( ILToken.ILType _) ], _), [ ty], _, _)]
627+ when mref.EnclosingTypeRef.Name = " System.Type" && mref.Name = " GetTypeFromHandle" ->
626628 let op = mkCallTypeOf cenv.g m ty
627629 ConvExprPrim cenv env op
628630
@@ -754,10 +756,6 @@ module FSharpExprConvert =
754756 else lim1
755757 E.FastIntegerForLoop( ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown)
756758
757- | TOp.ILCall(_, _, _, _ isNewObj, _ valUseFlags, _ isProp, _, ilMethRef, _ enclTypeArgs, _ methTypeArgs, _ tys), [], [ arg]
758- when ilMethRef.EnclosingTypeRef.Name = " System.Type" && ilMethRef.Name = " GetTypeFromHandle" ->
759- ConvExprPrim cenv env arg
760-
761759 | TOp.ILCall(_, _, _, isNewObj, valUseFlags, _ isProp, _, ilMethRef, enclTypeArgs, methTypeArgs, _ tys), [], callArgs ->
762760 ConvILCall cenv env ( isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m)
763761
0 commit comments