@@ -137,10 +137,6 @@ let rec TypeFeasiblySubsumesType ndeep (g: TcGlobals) (amap: ImportMap) m (ty1:
137137
138138 let checkSubsumes ty1 ty2 =
139139 match ty1, ty2 with
140- | TType_ measure _, TType_ measure _
141- | TType_ var _, _ | _, TType_ var _ ->
142- true
143-
144140 | TType_ app ( tc1, l1, _), TType_ app ( tc2, l2, _) when tyconRefEq g tc1 tc2 ->
145141 List.lengthsEqAndForall2 ( TypesFeasiblyEquiv ndeep g amap m) l1 l2
146142
@@ -160,13 +156,17 @@ let rec TypeFeasiblySubsumesType ndeep (g: TcGlobals) (amap: ImportMap) m (ty1:
160156 // See if any interface in type hierarchy of ty2 is a supertype of ty1
161157 List.exists ( TypeFeasiblySubsumesType ( ndeep + 1 ) g amap m ty1 NoCoerce) interfaces
162158
163- if g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then
159+ match ty1, ty2 with
160+ | TType_ measure _, TType_ measure _
161+ | TType_ var _, _ | _, TType_ var _ ->
162+ true
163+
164+ | _ when g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache ->
164165 match TTypeCacheKey.TryGetFromStrippedTypes( ty1, ty2, canCoerce) with
165166 | ValueSome key ->
166167 ( getTypeSubsumptionCache g) .GetOrAdd( key, fun _ -> checkSubsumes ty1 ty2)
167168 | _ -> checkSubsumes ty1 ty2
168- else
169- checkSubsumes ty1 ty2
169+ | _ -> checkSubsumes ty1 ty2
170170
171171and TypeFeasiblySubsumesTypeWithSupertypeCheck g amap m ndeep ty1 ty2 =
172172 match GetSuperTypeOfType g amap m ty2 with
0 commit comments