Skip to content

Commit 909adb8

Browse files
committed
fix merge conflicts
1 parent f46fc60 commit 909adb8

File tree

5 files changed

+8
-178
lines changed

5 files changed

+8
-178
lines changed

src/absil/il.fs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4317,26 +4317,16 @@ let resolveILMethodRefWithRescope r td (mref:ILMethodRef) =
43174317
let nargs = args.Length
43184318
let nm = mref.Name
43194319
let possibles = td.Methods.FindByNameAndArity (nm,nargs)
4320-
<<<<<<< HEAD
4321-
if isNil possibles then failwith ("no method named "+nm+" found in type "+td.Name);
4320+
if List.isEmpty possibles then failwith ("no method named "+nm+" found in type "+td.Name);
43224321
let argTypes = mref.ArgTypes |> List.map r
43234322
let retType : ILType = r mref.ReturnType
4324-
=======
4325-
if List.isEmpty possibles then failwith ("no method named " + nm + " found in type " + td.Name)
4326-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
43274323
match
43284324
possibles |> List.filter (fun md ->
43294325
mref.CallingConv = md.CallingConv &&
43304326
// REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
4331-
<<<<<<< HEAD
43324327
(md.Parameters,argTypes) ||> ILList.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) &&
43334328
// REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
43344329
r md.Return.Type = retType) with
4335-
=======
4336-
(md.Parameters,mref.ArgTypes) ||> ILList.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) &&
4337-
// REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct
4338-
r md.Return.Type = mref.ReturnType) with
4339-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
43404330
| [] -> failwith ("no method named "+nm+" with appropriate argument types found in type "+td.Name)
43414331
| [mdef] -> mdef
43424332
| _ -> failwith ("multiple methods named "+nm+" appear with identical argument types in type "+td.Name)

src/fsharp/CompileOps.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2687,11 +2687,7 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
26872687
checkFSharpBinaryCompatWithMscorlib filename ilReader.ILAssemblyRefs ilReader.ILModuleDef.ManifestOfAssembly.Version rangeStartup;
26882688
let fslibRoot = Path.GetDirectoryName(FileSystem.GetFullPathShim(filename))
26892689
fslibRoot (* , sprintf "v%d.%d" v1 v2 *)
2690-
<<<<<<< HEAD
2691-
with e ->
2692-
=======
26932690
with e ->
2694-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
26952691
error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup))
26962692
| _ ->
26972693
data.defaultFSharpBinariesDir

src/fsharp/ErrorLogger.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,10 @@ type internal CompileThreadStatic =
270270

271271
static member BuildPhaseUnchecked with get() = CompileThreadStatic.buildPhase (* This can be a null value *)
272272
static member BuildPhase
273-
<<<<<<< HEAD
274-
with get() = if box CompileThreadStatic.buildPhase <> null then CompileThreadStatic.buildPhase else ((* assert false; *) BuildPhase.DefaultPhase)
275-
=======
276273
with get() =
277274
match box CompileThreadStatic.buildPhase with
278-
| null -> assert false; BuildPhase.DefaultPhase
275+
| null -> (* assert false; *) BuildPhase.DefaultPhase
279276
| _ -> CompileThreadStatic.buildPhase
280-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
281277
and set v = CompileThreadStatic.buildPhase <- v
282278

283279
static member ErrorLogger

src/fsharp/ast.fs

Lines changed: 6 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -416,23 +416,16 @@ and
416416
///
417417
/// F# syntax : type.A.B.C<type, ..., type>
418418
/// commasm: ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them
419-
<<<<<<< HEAD
420419
| LongIdentApp of typeName:SynType * dotId:LongIdentWithDots * leftAngleRange:range option * genericNames:SynType list * commaRanges:range list * rightAngleRange:range option * range:range
421-
/// F# syntax : type * ... * type
422-
// the bool is true if / rather than * follows the type
423-
| Tuple of (bool*SynType) list * range:range
424-
=======
425-
| LongIdentApp of SynType * LongIdentWithDots * range option * SynType list * range list * range option * range
426420

427421
/// F# syntax : type * ... * type
428422
// the bool is true if / rather than * follows the type
429-
| Tuple of (bool*SynType) list * range
423+
| Tuple of (bool*SynType) list * range:range
430424

431425
/// F# syntax : struct (type * ... * type)
432426
// the bool is true if / rather than * follows the type
433427
| StructTuple of (bool*SynType) list * range
434428

435-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
436429
/// F# syntax : type[]
437430
| Array of int * elementType:SynType * range:range
438431
/// F# syntax : type -> type
@@ -462,6 +455,7 @@ and
462455
| SynType.App (range=m)
463456
| SynType.LongIdentApp (range=m)
464457
| SynType.Tuple (range=m)
458+
| SynType.StructTuple (range=m)
465459
| SynType.Array (range=m)
466460
| SynType.Fun (range=m)
467461
| SynType.Var (range=m)
@@ -474,14 +468,6 @@ and
474468
| SynType.MeasureDivide (range=m)
475469
| SynType.MeasurePower (range=m) -> m
476470
| SynType.LongIdent(lidwd) -> lidwd.Range
477-
<<<<<<< HEAD
478-
=======
479-
| SynType.App(_,_,_,_,_,_,m) | SynType.LongIdentApp(_,_,_,_,_,_,m) | SynType.Tuple(_,m) | SynType.StructTuple(_,m) | SynType.Array(_,_,m) | SynType.Fun(_,_,m)
480-
| SynType.Var(_,m) | SynType.Anon m | SynType.WithGlobalConstraints(_,_,m)
481-
| SynType.StaticConstant(_,m) | SynType.StaticConstantExpr(_,m) | SynType.StaticConstantNamed(_,_,m)
482-
| SynType.HashConstraint(_,m) | SynType.MeasureDivide(_,_,m) | SynType.MeasurePower(_,_,m) -> m
483-
484-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
485471

486472
and
487473
[<NoEquality; NoComparison;RequireQualifiedAccess>]
@@ -789,12 +775,12 @@ and
789775
/// range ignoring any (parse error) extra trailing dots
790776
member e.RangeSansAnyExtraDot =
791777
match e with
792-
<<<<<<< HEAD
793778
| SynExpr.Paren (range=m)
794779
| SynExpr.Quote (range=m)
795780
| SynExpr.Const (range=m)
796781
| SynExpr.Typed (range=m)
797782
| SynExpr.Tuple (range=m)
783+
| SynExpr.StructTuple (range=m)
798784
| SynExpr.ArrayOrList (range=m)
799785
| SynExpr.Record (range=m)
800786
| SynExpr.New (range=m)
@@ -843,62 +829,6 @@ and
843829
| SynExpr.YieldOrReturnFrom (range=m)
844830
| SynExpr.LetOrUseBang (range=m)
845831
| SynExpr.DoBang (range=m) -> m
846-
=======
847-
| SynExpr.Paren(_,_,_,m)
848-
| SynExpr.Quote(_,_,_,_,m)
849-
| SynExpr.Const(_,m)
850-
| SynExpr.Typed (_,_,m)
851-
| SynExpr.Tuple (_,_,m)
852-
| SynExpr.StructTuple (_,_,m)
853-
| SynExpr.ArrayOrList (_,_,m)
854-
| SynExpr.Record (_,_,_,m)
855-
| SynExpr.New (_,_,_,m)
856-
| SynExpr.ObjExpr (_,_,_,_,_,m)
857-
| SynExpr.While (_,_,_,m)
858-
| SynExpr.For (_,_,_,_,_,_,m)
859-
| SynExpr.ForEach (_,_,_,_,_,_,m)
860-
| SynExpr.CompExpr (_,_,_,m)
861-
| SynExpr.ArrayOrListOfSeqExpr (_,_,m)
862-
| SynExpr.Lambda (_,_,_,_,m)
863-
| SynExpr.Match (_,_,_,_,m)
864-
| SynExpr.MatchLambda (_,_,_,_,m)
865-
| SynExpr.Do (_,m)
866-
| SynExpr.Assert (_,m)
867-
| SynExpr.App (_,_,_,_,m)
868-
| SynExpr.TypeApp (_,_,_,_,_,_,m)
869-
| SynExpr.LetOrUse (_,_,_,_,m)
870-
| SynExpr.TryWith (_,_,_,_,m,_,_)
871-
| SynExpr.TryFinally (_,_,m,_,_)
872-
| SynExpr.Sequential (_,_,_,_,m)
873-
| SynExpr.ArbitraryAfterError(_,m)
874-
| SynExpr.FromParseError (_,m)
875-
| SynExpr.IfThenElse (_,_,_,_,_,_,m)
876-
| SynExpr.LongIdentSet (_,_,m)
877-
| SynExpr.NamedIndexedPropertySet (_,_,_,m)
878-
| SynExpr.DotIndexedGet (_,_,_,m)
879-
| SynExpr.DotIndexedSet (_,_,_,_,_,m)
880-
| SynExpr.DotSet (_,_,_,m)
881-
| SynExpr.DotNamedIndexedPropertySet (_,_,_,_,m)
882-
| SynExpr.LibraryOnlyUnionCaseFieldGet (_,_,_,m)
883-
| SynExpr.LibraryOnlyUnionCaseFieldSet (_,_,_,_,m)
884-
| SynExpr.LibraryOnlyILAssembly (_,_,_,_,m)
885-
| SynExpr.LibraryOnlyStaticOptimization (_,_,_,m)
886-
| SynExpr.TypeTest (_,_,m)
887-
| SynExpr.Upcast (_,_,m)
888-
| SynExpr.AddressOf (_,_,_,m)
889-
| SynExpr.Downcast (_,_,m)
890-
| SynExpr.JoinIn (_,_,_,m)
891-
| SynExpr.InferredUpcast (_,m)
892-
| SynExpr.InferredDowncast (_,m)
893-
| SynExpr.Null m
894-
| SynExpr.Lazy (_, m)
895-
| SynExpr.TraitCall(_,_,_,m)
896-
| SynExpr.ImplicitZero (m)
897-
| SynExpr.YieldOrReturn (_,_,m)
898-
| SynExpr.YieldOrReturnFrom (_,_,m)
899-
| SynExpr.LetOrUseBang (_,_,_,_,_,_,m)
900-
| SynExpr.DoBang (_,m) -> m
901-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
902832
| SynExpr.DotGet (expr,_,lidwd,m) -> if lidwd.ThereIsAnExtraDotAtTheEnd then unionRanges expr.Range lidwd.RangeSansAnyExtraDot else m
903833
| SynExpr.LongIdent (_,lidwd,_,_) -> lidwd.RangeSansAnyExtraDot
904834
| SynExpr.DiscardAfterMissingQualificationAfterDot (expr,_) -> expr.Range
@@ -908,11 +838,11 @@ and
908838
member e.RangeOfFirstPortion =
909839
match e with
910840
// haven't bothered making these cases better than just .Range
911-
<<<<<<< HEAD
912841
| SynExpr.Quote (range=m)
913842
| SynExpr.Const (range=m)
914843
| SynExpr.Typed (range=m)
915844
| SynExpr.Tuple (range=m)
845+
| SynExpr.StructTuple (range=m)
916846
| SynExpr.ArrayOrList (range=m)
917847
| SynExpr.Record (range=m)
918848
| SynExpr.New (range=m)
@@ -961,61 +891,6 @@ and
961891
| SynExpr.YieldOrReturnFrom (range=m)
962892
| SynExpr.LetOrUseBang (range=m)
963893
| SynExpr.DoBang (_,m) -> m
964-
=======
965-
| SynExpr.Quote(_,_,_,_,m)
966-
| SynExpr.Const(_,m)
967-
| SynExpr.Typed (_,_,m)
968-
| SynExpr.Tuple (_,_,m)
969-
| SynExpr.StructTuple (_,_,m)
970-
| SynExpr.ArrayOrList (_,_,m)
971-
| SynExpr.Record (_,_,_,m)
972-
| SynExpr.New (_,_,_,m)
973-
| SynExpr.ObjExpr (_,_,_,_,_,m)
974-
| SynExpr.While (_,_,_,m)
975-
| SynExpr.For (_,_,_,_,_,_,m)
976-
| SynExpr.CompExpr (_,_,_,m)
977-
| SynExpr.ArrayOrListOfSeqExpr (_,_,m)
978-
| SynExpr.Lambda (_,_,_,_,m)
979-
| SynExpr.Match (_,_,_,_,m)
980-
| SynExpr.MatchLambda (_,_,_,_,m)
981-
| SynExpr.Do (_,m)
982-
| SynExpr.Assert (_,m)
983-
| SynExpr.TypeApp (_,_,_,_,_,_,m)
984-
| SynExpr.LetOrUse (_,_,_,_,m)
985-
| SynExpr.TryWith (_,_,_,_,m,_,_)
986-
| SynExpr.TryFinally (_,_,m,_,_)
987-
| SynExpr.ArbitraryAfterError(_,m)
988-
| SynExpr.FromParseError (_,m)
989-
| SynExpr.DiscardAfterMissingQualificationAfterDot (_,m)
990-
| SynExpr.IfThenElse (_,_,_,_,_,_,m)
991-
| SynExpr.LongIdent (_,_,_,m)
992-
| SynExpr.LongIdentSet (_,_,m)
993-
| SynExpr.NamedIndexedPropertySet (_,_,_,m)
994-
| SynExpr.DotIndexedGet (_,_,_,m)
995-
| SynExpr.DotIndexedSet (_,_,_,_,_,m)
996-
| SynExpr.DotGet (_,_,_,m)
997-
| SynExpr.DotSet (_,_,_,m)
998-
| SynExpr.DotNamedIndexedPropertySet (_,_,_,_,m)
999-
| SynExpr.LibraryOnlyUnionCaseFieldGet (_,_,_,m)
1000-
| SynExpr.LibraryOnlyUnionCaseFieldSet (_,_,_,_,m)
1001-
| SynExpr.LibraryOnlyILAssembly (_,_,_,_,m)
1002-
| SynExpr.LibraryOnlyStaticOptimization (_,_,_,m)
1003-
| SynExpr.TypeTest (_,_,m)
1004-
| SynExpr.Upcast (_,_,m)
1005-
| SynExpr.AddressOf (_,_,_,m)
1006-
| SynExpr.Downcast (_,_,m)
1007-
| SynExpr.JoinIn (_,_,_,m)
1008-
| SynExpr.InferredUpcast (_,m)
1009-
| SynExpr.InferredDowncast (_,m)
1010-
| SynExpr.Null m
1011-
| SynExpr.Lazy (_, m)
1012-
| SynExpr.TraitCall(_,_,_,m)
1013-
| SynExpr.ImplicitZero (m)
1014-
| SynExpr.YieldOrReturn (_,_,m)
1015-
| SynExpr.YieldOrReturnFrom (_,_,m)
1016-
| SynExpr.LetOrUseBang (_,_,_,_,_,_,m)
1017-
| SynExpr.DoBang (_,m) -> m
1018-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
1019894
// these are better than just .Range, and also commonly applicable inside queries
1020895
| SynExpr.Paren(_,m,_,_) -> m
1021896
| SynExpr.Sequential (_,_,e1,_,_)
@@ -1087,7 +962,6 @@ and SynConstructorArgs =
1087962
and
1088963
[<NoEquality; NoComparison;RequireQualifiedAccess>]
1089964
SynPat =
1090-
<<<<<<< HEAD
1091965
| Const of constant:SynConst * range:range
1092966
| Wild of range:range
1093967
| Named of SynPat * id:Ident * isThisVar:bool (* true if 'this' variable *) * accessiblity:SynAccess option * range:range
@@ -1097,24 +971,10 @@ and
1097971
| Ands of SynPat list * range:range
1098972
| LongIdent of dotId:LongIdentWithDots * (* holds additional ident for tooling *) Ident option * SynValTyparDecls option (* usually None: temporary used to parse "f<'a> x = x"*) * SynConstructorArgs * SynAccess option * range:range
1099973
| Tuple of SynPat list * range:range
974+
| StructTuple of SynPat list * range:range
1100975
| Paren of SynPat * range:range
1101976
| ArrayOrList of bool * SynPat list * range:range
1102977
| Record of fields:((LongIdent * Ident) * SynPat) list * range:range
1103-
=======
1104-
| Const of SynConst * range
1105-
| Wild of range
1106-
| Named of SynPat * Ident * bool (* true if 'this' variable *) * SynAccess option * range
1107-
| Typed of SynPat * SynType * range
1108-
| Attrib of SynPat * SynAttributes * range
1109-
| Or of SynPat * SynPat * range
1110-
| Ands of SynPat list * range
1111-
| LongIdent of LongIdentWithDots * (* holds additional ident for tooling *) Ident option * SynValTyparDecls option (* usually None: temporary used to parse "f<'a> x = x"*) * SynConstructorArgs * SynAccess option * range
1112-
| Tuple of SynPat list * range
1113-
| StructTuple of SynPat list * range
1114-
| Paren of SynPat * range
1115-
| ArrayOrList of bool * SynPat list * range
1116-
| Record of ((LongIdent * Ident) * SynPat) list * range
1117-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
1118978
/// 'null'
1119979
| Null of range:range
1120980
/// '?id' -- for optional argument names
@@ -1133,7 +993,6 @@ and
1133993

1134994
member p.Range =
1135995
match p with
1136-
<<<<<<< HEAD
1137996
| SynPat.Const (range=m)
1138997
| SynPat.Wild (range=m)
1139998
| SynPat.Named (range=m)
@@ -1142,6 +1001,7 @@ and
11421001
| SynPat.LongIdent (range=m)
11431002
| SynPat.ArrayOrList (range=m)
11441003
| SynPat.Tuple (range=m)
1004+
| SynPat.StructTuple (range=m)
11451005
| SynPat.Typed (range=m)
11461006
| SynPat.Attrib (range=m)
11471007
| SynPat.Record (range=m)
@@ -1153,13 +1013,6 @@ and
11531013
| SynPat.OptionalVal (range=m)
11541014
| SynPat.Paren (range=m)
11551015
| SynPat.FromParseError (range=m) -> m
1156-
=======
1157-
| SynPat.Const(_,m) | SynPat.Wild m | SynPat.Named (_,_,_,_,m) | SynPat.Or (_,_,m) | SynPat.Ands (_,m)
1158-
| SynPat.LongIdent (_,_,_,_,_,m) | SynPat.ArrayOrList(_,_,m) | SynPat.Tuple (_,m) | SynPat.StructTuple (_,m) |SynPat.Typed(_,_,m) |SynPat.Attrib(_,_,m)
1159-
| SynPat.Record (_,m) | SynPat.DeprecatedCharRange (_,_,m) | SynPat.Null m | SynPat.IsInst (_,m) | SynPat.QuoteExpr (_,m)
1160-
| SynPat.InstanceMember(_,_,_,_,m) | SynPat.OptionalVal(_,m) | SynPat.Paren(_,m)
1161-
| SynPat.FromParseError (_,m) -> m
1162-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
11631016

11641017
and
11651018
[<NoEquality; NoComparison>]

src/fsharp/fsi/fsi.fs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,13 +1234,8 @@ type internal FsiDynamicCompiler
12341234
filename, parsedInput)
12351235
|> List.unzip
12361236

1237-
<<<<<<< HEAD
12381237
errorLogger.AbortOnError(fsiConsoleOutput);
1239-
if inputs |> List.exists isNone then failwith "parse error";
1240-
=======
1241-
errorLogger.AbortOnError();
12421238
if inputs |> List.exists Option.isNone then failwith "parse error"
1243-
>>>>>>> a2f37b64ac6a466525c3da0e7a5e85be7da8f378
12441239
let inputs = List.map Option.get inputs
12451240
let istate = List.fold2 fsiDynamicCompiler.ProcessMetaCommandsFromInputAsInteractiveCommands istate sourceFiles inputs
12461241
fsiDynamicCompiler.EvalParsedSourceFiles (errorLogger, istate, inputs)

0 commit comments

Comments
 (0)