From aa4fc7edaf6995762f937dd05bf06ab63e04d009 Mon Sep 17 00:00:00 2001 From: Phillip Carter Date: Fri, 10 Jul 2020 00:19:14 -0700 Subject: [PATCH] yeet (#9657) yeet --- src/fsharp/PostInferenceChecks.fs | 43 ------------------------------- 1 file changed, 43 deletions(-) diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index f3dc323b6b3..dda6f889e8f 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -706,49 +706,6 @@ let compareTypesWithRegardToTypeVariablesAndMeasures g amap m typ1 typ2 = FeasiblyEqual else NotEqual - -//let CheckMultipleInterfaceInstantiations cenv (typ:TType) (interfaces:TType list) isObjectExpression m = -// let keyf ty = assert isAppTy cenv.g ty; (tcrefOfAppTy cenv.g ty).Stamp -// if not(cenv.g.langVersion.SupportsFeature LanguageFeature.InterfacesWithMultipleGenericInstantiation) then -// let table = interfaces |> MultiMap.initBy keyf -// let firstInterfaceWithMultipleGenericInstantiations = -// interfaces |> List.tryPick (fun typ1 -> -// table |> MultiMap.find (keyf typ1) |> List.tryPick (fun typ2 -> -// if // same nominal type -// tyconRefEq cenv.g (tcrefOfAppTy cenv.g typ1) (tcrefOfAppTy cenv.g typ2) && -// // different instantiations -// not (typeEquivAux EraseNone cenv.g typ1 typ2) -// then Some (typ1, typ2) -// else None)) -// match firstInterfaceWithMultipleGenericInstantiations with -// | None -> () -// | Some (typ1, typ2) -> -// let typ1Str = NicePrint.minimalStringOfType cenv.denv typ1 -// let typ2Str = NicePrint.minimalStringOfType cenv.denv typ2 -// errorR(Error(FSComp.SR.chkMultipleGenericInterfaceInstantiations(typ1Str, typ2Str), m)) -// else -// let groups = interfaces |> List.groupBy keyf -// let errors = seq { -// for (_, items) in groups do -// for i1 in 0 .. items.Length - 1 do -// for i2 in i1 + 1 .. items.Length - 1 do -// let typ1 = items.[i1] -// let typ2 = items.[i2] -// match compareTypesWithRegardToTypeVariablesAndMeasures cenv.g cenv.amap m typ1 typ2 with -// | ExactlyEqual -> () // exact duplicates are checked in another place -// | FeasiblyEqual -> -// let typ1Str = NicePrint.minimalStringOfType cenv.denv typ1 -// let typ2Str = NicePrint.minimalStringOfType cenv.denv typ2 -// if isObjectExpression then -// yield (Error(FSComp.SR.typrelInterfaceWithConcreteAndVariableObjectExpression(tcRef1.DisplayNameWithStaticParametersAndUnderscoreTypars, typ1Str, typ2Str),m)) -// else -// let typStr = NicePrint.minimalStringOfType cenv.denv typ -// yield (Error(FSComp.SR.typrelInterfaceWithConcreteAndVariable(typStr, tcRef1.DisplayNameWithStaticParametersAndUnderscoreTypars, typ1Str, typ2Str),m)) -// | NotEqual -> () -// } -// match Seq.tryHead errors with -// | None -> () -// | Some e -> errorR(e) let CheckMultipleInterfaceInstantiations cenv (typ:TType) (interfaces:TType list) isObjectExpression m = let keyf ty = assert isAppTy cenv.g ty; (tcrefOfAppTy cenv.g ty).Stamp