diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs index fe25b787944..96c1e91e193 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.fs @@ -5869,10 +5869,14 @@ let remapAttribKind tmenv k = | ILAttrib _ as x -> x | FSAttrib vref -> FSAttrib(remapValRef tmenv vref) -let tmenvCopyRemapAndBindTypars remapAttrib tmenv tps = - let tps', tyenvinner = copyAndRemapAndBindTyparsFull remapAttrib tmenv tps - let tmenvinner = tyenvinner - tps', tmenvinner +let tmenvCopyRemapAndBindTypars remapAttrib tmenv tps = + match tmenv.realsig with + | false -> + let tps', tyenvinner = copyAndRemapAndBindTyparsFull remapAttrib tmenv tps + let tmenvinner = tyenvinner + tps', tmenvinner + | true -> + tps, tmenv type RemapContext = { g: TcGlobals