@@ -706,49 +706,6 @@ let compareTypesWithRegardToTypeVariablesAndMeasures g amap m typ1 typ2 =
706
706
FeasiblyEqual
707
707
else
708
708
NotEqual
709
-
710
- //let CheckMultipleInterfaceInstantiations cenv (typ:TType) (interfaces:TType list) isObjectExpression m =
711
- // let keyf ty = assert isAppTy cenv.g ty; (tcrefOfAppTy cenv.g ty).Stamp
712
- // if not(cenv.g.langVersion.SupportsFeature LanguageFeature.InterfacesWithMultipleGenericInstantiation) then
713
- // let table = interfaces |> MultiMap.initBy keyf
714
- // let firstInterfaceWithMultipleGenericInstantiations =
715
- // interfaces |> List.tryPick (fun typ1 ->
716
- // table |> MultiMap.find (keyf typ1) |> List.tryPick (fun typ2 ->
717
- // if // same nominal type
718
- // tyconRefEq cenv.g (tcrefOfAppTy cenv.g typ1) (tcrefOfAppTy cenv.g typ2) &&
719
- // // different instantiations
720
- // not (typeEquivAux EraseNone cenv.g typ1 typ2)
721
- // then Some (typ1, typ2)
722
- // else None))
723
- // match firstInterfaceWithMultipleGenericInstantiations with
724
- // | None -> ()
725
- // | Some (typ1, typ2) ->
726
- // let typ1Str = NicePrint.minimalStringOfType cenv.denv typ1
727
- // let typ2Str = NicePrint.minimalStringOfType cenv.denv typ2
728
- // errorR(Error(FSComp.SR.chkMultipleGenericInterfaceInstantiations(typ1Str, typ2Str), m))
729
- // else
730
- // let groups = interfaces |> List.groupBy keyf
731
- // let errors = seq {
732
- // for (_, items) in groups do
733
- // for i1 in 0 .. items.Length - 1 do
734
- // for i2 in i1 + 1 .. items.Length - 1 do
735
- // let typ1 = items.[i1]
736
- // let typ2 = items.[i2]
737
- // match compareTypesWithRegardToTypeVariablesAndMeasures cenv.g cenv.amap m typ1 typ2 with
738
- // | ExactlyEqual -> () // exact duplicates are checked in another place
739
- // | FeasiblyEqual ->
740
- // let typ1Str = NicePrint.minimalStringOfType cenv.denv typ1
741
- // let typ2Str = NicePrint.minimalStringOfType cenv.denv typ2
742
- // if isObjectExpression then
743
- // yield (Error(FSComp.SR.typrelInterfaceWithConcreteAndVariableObjectExpression(tcRef1.DisplayNameWithStaticParametersAndUnderscoreTypars, typ1Str, typ2Str),m))
744
- // else
745
- // let typStr = NicePrint.minimalStringOfType cenv.denv typ
746
- // yield (Error(FSComp.SR.typrelInterfaceWithConcreteAndVariable(typStr, tcRef1.DisplayNameWithStaticParametersAndUnderscoreTypars, typ1Str, typ2Str),m))
747
- // | NotEqual -> ()
748
- // }
749
- // match Seq.tryHead errors with
750
- // | None -> ()
751
- // | Some e -> errorR(e)
752
709
753
710
let CheckMultipleInterfaceInstantiations cenv ( typ : TType ) ( interfaces : TType list ) isObjectExpression m =
754
711
let keyf ty = assert isAppTy cenv.g ty; ( tcrefOfAppTy cenv.g ty) .Stamp
0 commit comments