Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to feature/string-interp #9661

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions src/fsharp/PostInferenceChecks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down