You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
// Check that no available prior override implements this dispatch slot
278
278
not(DispatchSlotIsAlreadyImplemented g amap m availPriorOverridesKeyed dispatchSlot)
279
279
then
280
-
// error reporting path
281
-
let(CompiledSig(vargtys,_vrty,fvmtps,_))= CompiledSigOfMeth g amap m dispatchSlot
280
+
// error reporting path
281
+
letcompiledSig= CompiledSigOfMeth g amap m dispatchSlot
282
+
282
283
letnoimpl()=
283
284
if isReqdTyInterfacethen
284
285
fail(Error(FSComp.SR.typrelNoImplementationGivenWithSuggestion(NicePrint.stringOfMethInfo amap m denv dispatchSlot), m))
285
286
else
286
287
fail(Error(FSComp.SR.typrelNoImplementationGiven(NicePrint.stringOfMethInfo amap m denv dispatchSlot), m))
287
-
288
-
match overrides|> List.filter(IsPartialMatch gamap mdispatchSlot)with
288
+
289
+
match overrides|> List.filter(IsPartialMatch g dispatchSlot compiledSig)with
289
290
|[]->
290
291
letpossibleOverrides=
291
292
overrides
@@ -300,7 +301,9 @@ module DispatchSlotChecking =
300
301
|> List.filter(fun(RequiredSlot(dispatchSlot,_))-> IsNameMatch dispatchSlot overrideBy&& IsImplMatch g dispatchSlot overrideBy)
301
302
|> isNilOrSingleton
302
303
|>not
303
-
304
+
305
+
let(CompiledSig(vargtys,_,fvmtps,_))= compiledSig
306
+
304
307
if moreThanOnePossibleDispatchSlotthen
305
308
// Error will be reported below in CheckOverridesAreAllUsedOnce
306
309
()
@@ -309,7 +312,7 @@ module DispatchSlotChecking =
309
312
fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfArguments(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
310
313
elif mtps.Length<> fvmtps.Lengththen
311
314
fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfTypeParameters(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
312
-
elifnot(IsTyparKindMatchg amap m dispatchSlot overrideBy)then
fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectKindsOfGenericParameters(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
314
317
else
315
318
fail(Error(FSComp.SR.typrelMemberCannotImplement(FormatOverride denv overrideBy, NicePrint.stringOfMethInfo amap m denv dispatchSlot, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
@@ -343,7 +346,7 @@ module DispatchSlotChecking =
343
346
match relevantVirts|> List.filter(fun dispatchSlot-> OverrideImplementsDispatchSlot g amap m dispatchSlot overrideBy)with
344
347
|[]->
345
348
// This is all error reporting
346
-
match relevantVirts|> List.filter(fun dispatchSlot-> IsPartialMatch g amap m dispatchSlot overrideBy)with
349
+
match relevantVirts|> List.filter(fun dispatchSlot-> IsPartialMatch gdispatchSlot(CompiledSigOfMeth gamap m dispatchSlot) overrideBy)with