Skip to content

Commit

Permalink
(minor) minimize diff, typos, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smoothdeveloper committed Apr 30, 2019
1 parent 1a8559e commit 19e2c3c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/fsharp/ConstraintSolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,7 @@ and ResolveOverloading
| Some (fromTy, toTy) ->
UnresolvedConversionOperator (denv, fromTy, toTy, m)
| None ->
// Otherwise collect a list of possible overloads
let nl = System.Environment.NewLine
let msg =
let displayArgType (name , ttype) =
Expand Down Expand Up @@ -2479,7 +2480,7 @@ and ResolveOverloading
reqdRetTyOpt
calledMeth) with
| OkResult _ -> None
| ErrorResult(_exns, exn) -> Some {methodSlot = calledMeth; amap = amap; error = exn })
| ErrorResult(_, exn) -> Some {methodSlot = calledMeth; amap = amap; error = exn })

None, ErrorD (failOverloading (NoOverloadsFound (methodName, errors))), NoTrace

Expand Down Expand Up @@ -2621,8 +2622,6 @@ and ResolveOverloading
match bestMethods with
| [(calledMeth, warns, t)] -> Some calledMeth, OkResult (warns, ()), WithTrace t
| bestMethods ->

//let methodNames =
let methods =
let getMethodSlotsAndErrors =
function | methodSlot, [] -> List.singleton {methodSlot = methodSlot; error = Unchecked.defaultof<exn>; amap = amap}
Expand All @@ -2640,11 +2639,8 @@ and ResolveOverloading
| m -> m |> List.map (fun (methodSlot, errors, _) -> getMethodSlotsAndErrors (methodSlot,errors))
| m -> m |> List.map (fun (methodSlot, errors, _) -> getMethodSlotsAndErrors (methodSlot,errors))


let methods = List.concat methods
//|> List.map (fun cmeth -> NicePrint.stringOfMethInfo amap m denv cmeth.Method)
//|> List.sort


None, ErrorD (failOverloading (PossibleCandidates(methodName, methods))), NoTrace

// If we've got a candidate solution: make the final checks - no undo here!
Expand Down
6 changes: 3 additions & 3 deletions src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ------------------------------------------------------------------------------
# use a completely new error number and keep messages in their surounding groups
# ------------------------------------------------------------------------------
# -------------------------------------------------------------------------------
# use a completely new error number and keep messages in their surrounding groups
# -------------------------------------------------------------------------------
undefinedNameNamespace,"The namespace '%s' is not defined."
undefinedNameNamespaceOrModule,"The namespace or module '%s' is not defined."
undefinedNameFieldConstructorOrMember,"The field, constructor or member '%s' is not defined."
Expand Down
8 changes: 4 additions & 4 deletions src/fsharp/MethodCalls.fs
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ type CalledMeth<'T>
callerTyArgs: TType list, // the 'caller type arguments', i.e. user-given generic instantiation of the method we're attempting to call
pinfoOpt: PropInfo option, // the property related to the method we're attempting to call, if any
callerObjArgTys: TType list, // the types of the actual object argument, if any
callerArgs: CallerArgs<'T>, // the data about any arguments supplied by the caller
allowParamArgs: bool, // do we allow the use of a param args method in its "expanded" form?
allowOutAndOptArgs: bool, // do we allow the use of the transformation that converts out arguments as tuple returns?
tyargsOpt : TType option) // method parameters
callerArgs: CallerArgs<'T>, // the data about any arguments supplied by the caller
allowParamArgs: bool, // do we allow the use of a param args method in its "expanded" form?
allowOutAndOptArgs: bool, // do we allow the use of the transformation that converts out arguments as tuple returns?
tyargsOpt : TType option) // method parameters
=
let g = infoReader.g
let methodRetTy = minfo.GetFSharpReturnTy(infoReader.amap, m, calledTyArgs)
Expand Down

0 comments on commit 19e2c3c

Please sign in to comment.