diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs index f7554e44c39..fc09a339c0f 100644 --- a/src/fsharp/AttributeChecking.fs +++ b/src/fsharp/AttributeChecking.fs @@ -79,6 +79,11 @@ type AttribInfo = | FSAttribInfo of TcGlobals * Attrib | ILAttribInfo of TcGlobals * Import.ImportMap * ILScopeRef * ILAttribute * range + member x.Range = + match x with + | FSAttribInfo(_, attrib) -> attrib.Range + | ILAttribInfo (_, _, _, _, m) -> m + member x.TyconRef = match x with | FSAttribInfo(_g, Attrib(tcref, _, _, _, _, _, _)) -> tcref diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 77fa96efaa6..5339231db31 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -1864,6 +1864,7 @@ let GenWitnessExpr amap g m (traitInfo: TraitConstraintInfo) argExprs = let argTypes = minfo.GetParamTypes(amap, m, methArgTys) |> List.concat + // do not apply coercion to the 'receiver' argument let receiverArgOpt, argExprs = if minfo.IsInstance then @@ -1871,6 +1872,13 @@ let GenWitnessExpr amap g m (traitInfo: TraitConstraintInfo) argExprs = | h :: t -> Some h, t | argExprs -> None, argExprs else None, argExprs + + // For methods taking no arguments, 'argExprs' will be a single unit expression here + let argExprs = + match argTypes, argExprs with + | [], [_] -> [] + | _ -> argExprs + let convertedArgs = (argExprs, argTypes) ||> List.map2 (fun expr expectedTy -> mkCoerceIfNeeded g expectedTy (tyOfExpr g expr) expr) match receiverArgOpt with | Some r -> r :: convertedArgs diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index 76ab9937fd5..462943e7439 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -4115,6 +4115,8 @@ type Attrib = member x.TyconRef = (let (Attrib(tcref, _, _, _, _, _, _)) = x in tcref) + member x.Range = (let (Attrib(_, _, _, _, _, _, m)) = x in m) + override x.ToString() = "attrib" + x.TyconRef.ToString() /// We keep both source expression and evaluated expression around to help intellisense and signature printing diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index ef2c7acc7d2..8ce4839b3da 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -4237,9 +4237,12 @@ let ComputeRemappingFromInferredSignatureToExplicitSignature g mty msigty = /// At TMDefRec nodes abstract (virtual) vslots are effectively binders, even /// though they are tucked away inside the tycon. This helper function extracts the /// virtual slots to aid with finding this babies. -let abstractSlotValsOfTycons (tycons: Tycon list) = +let abstractSlotValRefsOfTycons (tycons: Tycon list) = tycons |> List.collect (fun tycon -> if tycon.IsFSharpObjectModelTycon then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots else []) + +let abstractSlotValsOfTycons (tycons: Tycon list) = + abstractSlotValRefsOfTycons tycons |> List.map (fun v -> v.Deref) let rec accEntityRemapFromModuleOrNamespace msigty x acc = diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index b599a8a68bf..c209ace4ec6 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -1043,6 +1043,8 @@ module SimplifyTypes = val superOfTycon : TcGlobals -> Tycon -> TType +val abstractSlotValRefsOfTycons : Tycon list -> ValRef list + val abstractSlotValsOfTycons : Tycon list -> Val list //------------------------------------------------------------------------- diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index d64780a6011..39e59c3cda3 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -5,6 +5,7 @@ namespace FSharp.Compiler.SourceCodeServices open FSharp.Compiler open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler.ErrorLogger open FSharp.Compiler.Lib open FSharp.Compiler.Infos open FSharp.Compiler.QuotationTranslator @@ -35,13 +36,26 @@ module ExprTranslationImpl = isinstVals: ValMap substVals: ValMap + + /// Indicates that we disable generation of witnesses + suppressWitnesses: bool + + /// All witnesses in scope and their mapping to lambda variables. + // + // Note: this uses an immutable HashMap/Dictionary with an IEqualityComparer that captures TcGlobals, see + // the point where the empty initial object is created. + witnessesInScope: TraitWitnessInfoHashMap + } - static member Empty = + static member Empty g = { vs=ValMap<_>.Empty - tyvs = Map.empty ; + tyvs = Map.empty isinstVals = ValMap<_>.Empty - substVals = ValMap<_>.Empty } + substVals = ValMap<_>.Empty + suppressWitnesses = false + witnessesInScope = EmptyTraitWitnessInfoHashMap g + } member env.BindTypar (v: Typar, gp) = { env with tyvs = env.tyvs.Add(v.Stamp, gp ) } @@ -81,7 +95,7 @@ type E = | IfThenElse of FSharpExpr * FSharpExpr * FSharpExpr | DecisionTree of FSharpExpr * (FSharpMemberOrFunctionOrValue list * FSharpExpr) list | DecisionTreeSuccess of int * FSharpExpr list - | Call of FSharpExpr option * FSharpMemberOrFunctionOrValue * FSharpType list * FSharpType list * FSharpExpr list + | Call of FSharpExpr option * FSharpMemberOrFunctionOrValue * FSharpType list * FSharpType list * FSharpExpr list * FSharpExpr list | NewObject of FSharpMemberOrFunctionOrValue * FSharpType list * FSharpExpr list | LetRec of ( FSharpMemberOrFunctionOrValue * FSharpExpr) list * FSharpExpr | Let of (FSharpMemberOrFunctionOrValue * FSharpExpr) * FSharpExpr @@ -117,6 +131,7 @@ type E = | ILFieldGet of FSharpExpr option * FSharpType * string | ILFieldSet of FSharpExpr option * FSharpType * string * FSharpExpr | ILAsm of string * FSharpType list * FSharpExpr list + | WitnessArg of int /// Used to represent the information at an object expression member and [] FSharpObjectExprOverride(sgn: FSharpAbstractSignature, gps: FSharpGenericParameter list, args: FSharpMemberOrFunctionOrValue list list, body: FSharpExpr) = @@ -128,10 +143,11 @@ and [] FSharpObjectExprOverride(sgn: FSharpAbstractSignature, gps: FSha /// The type of expressions provided through the compiler API. and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, ty) = + let mutable e = match f with None -> e | Some _ -> Unchecked.defaultof member x.Range = m member x.Type = FSharpType(cenv, ty) member x.cenv = cenv - member x.E = match f with None -> e | Some f -> f().E + member x.E = match box e with null -> (e <- f.Value().E); e | _ -> e override x.ToString() = sprintf "%+A" x.E member x.ImmediateSubExpressions = @@ -150,7 +166,7 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, | E.NewUnionCase (_unionType, _unionCase, es) -> es | E.NewTuple (_tupleType, es) -> es | E.TupleGet (_tupleType, _itemIndex, tupleExpr) -> [tupleExpr] - | E.Call (objOpt, _b, _c, _d, es) -> (match objOpt with None -> es | Some x -> x :: es) + | E.Call (objOpt, _b, _c, _d, ws, es) -> (match objOpt with None -> ws @ es | Some x -> x :: ws @ es) | E.NewObject (_a, _b, c) -> c | E.FSharpFieldGet (objOpt, _b, _c) -> (match objOpt with None -> [] | Some x -> [x]) | E.FSharpFieldSet (objOpt, _b, _c, d) -> (match objOpt with None -> [d] | Some x -> [x;d]) @@ -187,7 +203,7 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, | E.UnionCaseSet (obj, _unionType, _unionCase, _unionField, valueExpr) -> [ yield obj; yield valueExpr ] | E.TraitCall (_sourceTypes, _traitName, _memberFlags, _paramTypes, _retTypes, args) -> args | E.Unused -> [] // unexpected - + | E.WitnessArg _n -> [] /// The implementation of the conversion operation module FSharpExprConvert = @@ -409,19 +425,19 @@ module FSharpExprConvert = let (numEnclTypeArgs, _, isNewObj, _valUseFlags, _isSelfInit, takesInstanceArg, _isPropGet, _isPropSet) = GetMemberCallInfo cenv.g (vref, vFlags) - let isMember, curriedArgInfos = + let isMember, tps, curriedArgInfos = match vref.MemberInfo with | Some _ when not vref.IsExtensionMember -> // This is an application of a member method // We only count one argument block for these. - let _tps, curriedArgInfos, _, _ = GetTypeOfMemberInFSharpForm cenv.g vref - true, curriedArgInfos + let tps, curriedArgInfos, _, _ = GetTypeOfMemberInFSharpForm cenv.g vref + true, tps, curriedArgInfos | _ -> // This is an application of a module value or extension member let arities = arityOfVal vref.Deref - let _tps, curriedArgInfos, _, _ = GetTopValTypeInFSharpForm cenv.g arities vref.Type m - false, curriedArgInfos + let tps, curriedArgInfos, _, _ = GetTopValTypeInFSharpForm cenv.g arities vref.Type m + false, tps, curriedArgInfos // Compute the object arguments as they appear in a compiled call // Strip off the object argument, if any. The curriedArgInfos are already adjusted to compiled member form @@ -467,12 +483,35 @@ module FSharpExprConvert = if isMember then let callArgs = (objArgs :: untupledCurriedArgs) |> List.concat let enclTyArgs, methTyArgs = List.splitAfter numEnclTypeArgs tyargs + let witnessArgsR = GetWitnessArgs cenv env vref m tps tyargs // tailcall - ConvObjectModelCallLinear cenv env (isNewObj, FSharpMemberOrFunctionOrValue(cenv, vref), enclTyArgs, methTyArgs, callArgs) contf2 + ConvObjectModelCallLinear cenv env (isNewObj, FSharpMemberOrFunctionOrValue(cenv, vref), enclTyArgs, methTyArgs, witnessArgsR, callArgs) contf2 else let v = FSharpMemberOrFunctionOrValue(cenv, vref) + let witnessArgsR = GetWitnessArgs cenv env vref m vref.Typars tyargs // tailcall - ConvObjectModelCallLinear cenv env (false, v, [], tyargs, List.concat untupledCurriedArgs) contf2 + ConvObjectModelCallLinear cenv env (false, v, [], tyargs, witnessArgsR, List.concat untupledCurriedArgs) contf2 + + and GetWitnessArgs cenv (env: ExprTranslationEnv) (vref: ValRef) m tps tyargs : FSharpExpr list = + let g = cenv.g + if cenv.g.langVersion.SupportsFeature(Features.LanguageFeature.WitnessPassing) && not env.suppressWitnesses then + let witnessExprs = + match ConstraintSolver.CodegenWitnessesForTyparInst cenv.tcValF g cenv.amap m tps tyargs with + // There is a case where optimized code makes expressions that do a shift-left on the 'char' + // type. There is no witness for this case. This is due to the code + // let inline HashChar (x:char) = (# "or" (# "shl" x 16 : int #) x : int #) + // in FSharp.Core. + | ErrorResult _ when vref.LogicalName = "op_LeftShift" && tyargs.Length = 1 -> [] + | res -> CommitOperationResult res + let env = { env with suppressWitnesses = true } + witnessExprs |> List.map (fun arg -> + match arg with + | Choice1Of2 traitInfo -> + ConvWitnessInfo cenv env m traitInfo + | Choice2Of2 arg -> + ConvExpr cenv env arg) + else + [] and ConvExprPrim (cenv: SymbolEnv) (env: ExprTranslationEnv) expr = // Eliminate integer 'for' loops @@ -554,7 +593,7 @@ module FSharpExprConvert = let vslR = List.map (List.map (ConvVal cenv)) tmvs let sgn = FSharpAbstractSignature(cenv, slotsig) let tpsR = [ for tp in tps -> FSharpGenericParameter(cenv, tp) ] - let env = ExprTranslationEnv.Empty.BindTypars (Seq.zip tps tpsR |> Seq.toList) + let env = env.BindTypars (Seq.zip tps tpsR |> Seq.toList) let env = env.BindCurriedVals tmvs let bodyR = ConvExpr cenv env body FSharpObjectExprOverride(sgn, tpsR, vslR, bodyR) ] @@ -841,9 +880,29 @@ module FSharpExprConvert = ConvExprPrim cenv env replExpr | _ -> wfail (sprintf "unhandled construct in AST", m) + | Expr.WitnessArg (traitInfo, _m) -> + ConvWitnessInfoPrim cenv env traitInfo | _ -> wfail (sprintf "unhandled construct in AST", expr.Range) + and ConvWitnessInfoPrim _cenv env traitInfo : E = + let witnessInfo = traitInfo.TraitKey + let env = { env with suppressWitnesses = true } + // First check if this is a witness in ReflectedDefinition code + if env.witnessesInScope.ContainsKey witnessInfo then + let witnessArgIdx = env.witnessesInScope.[witnessInfo] + E.WitnessArg(witnessArgIdx) + // Otherwise it is a witness in a quotation literal + else + //failwith "witness not found" + E.WitnessArg(-1) + + and ConvWitnessInfo cenv env m traitInfo : FSharpExpr = + let g = cenv.g + let witnessInfo = traitInfo.TraitKey + let witnessTy = GenWitnessTy g witnessInfo + let traitInfoR = ConvWitnessInfoPrim cenv env traitInfo + Mk cenv m witnessTy traitInfoR and ConvLetBind cenv env (bind : Binding) = match bind.Expr with @@ -895,7 +954,7 @@ module FSharpExprConvert = let enclosingType = generalizedTyconRef tcref let makeCall minfo = - ConvObjectModelCallLinear cenv env (isNewObj, minfo, enclTypeArgs, methTypeArgs, callArgs) id + ConvObjectModelCallLinear cenv env (isNewObj, minfo, enclTypeArgs, methTypeArgs, [], callArgs) id let makeFSCall isMember (vr: ValRef) = let memOrVal = @@ -1079,7 +1138,7 @@ module FSharpExprConvert = with e -> failwithf "An IL call to '%s' could not be resolved: %s" (ilMethRef.ToString()) e.Message - and ConvObjectModelCallLinear cenv env (isNewObj, v: FSharpMemberOrFunctionOrValue, enclTyArgs, methTyArgs, callArgs) contF = + and ConvObjectModelCallLinear cenv env (isNewObj, v: FSharpMemberOrFunctionOrValue, enclTyArgs, methTyArgs, witnessArgsR: FSharpExpr list, callArgs) contF = let enclTyArgsR = ConvTypes cenv enclTyArgs let methTyArgsR = ConvTypes cenv methTyArgs let obj, callArgs = @@ -1095,8 +1154,7 @@ module FSharpExprConvert = if isNewObj then E.NewObject(v, enclTyArgsR, callArgsR) else - E.Call(objR, v, enclTyArgsR, methTyArgsR, callArgsR)) - + E.Call(objR, v, enclTyArgsR, methTyArgsR, witnessArgsR, callArgsR)) and ConvExprs cenv env args = List.map (ConvExpr cenv env) args @@ -1255,7 +1313,7 @@ and FSharpImplementationFileContents(cenv, mimpl) = let v = FSharpMemberOrFunctionOrValue(cenv, mkLocalValRef v) let gps = v.GenericParameters let vslR = List.map (List.map (FSharpExprConvert.ConvVal cenv)) vsl - let env = ExprTranslationEnv.Empty.BindTypars (Seq.zip tps gps |> Seq.toList) + let env = ExprTranslationEnv.Empty(cenv.g).BindTypars (Seq.zip tps gps |> Seq.toList) let env = env.BindCurriedVals vsl let e = FSharpExprConvert.ConvExprOnDemand cenv env body FSharpImplementationFileDeclaration.MemberOrFunctionOrValue(v, vslR, e) @@ -1277,7 +1335,7 @@ and FSharpImplementationFileContents(cenv, mimpl) = | TMDefLet(bind, _m) -> [ yield getBind bind ] | TMDefDo(expr, _m) -> - [ let expr = FSharpExprConvert.ConvExprOnDemand cenv ExprTranslationEnv.Empty expr + [ let expr = FSharpExprConvert.ConvExprOnDemand cenv (ExprTranslationEnv.Empty(cenv.g)) expr yield FSharpImplementationFileDeclaration.InitAction expr ] | TMDefs mdefs -> [ for mdef in mdefs do yield! getDecls mdef ] @@ -1303,7 +1361,8 @@ module BasicPatterns = let (|NewUnionCase|_|) (e: FSharpExpr) = match e.E with E.NewUnionCase (e, tys, es) -> Some (e, tys, es) | _ -> None let (|NewTuple|_|) (e: FSharpExpr) = match e.E with E.NewTuple (ty, es) -> Some (ty, es) | _ -> None let (|TupleGet|_|) (e: FSharpExpr) = match e.E with E.TupleGet (ty, n, es) -> Some (ty, n, es) | _ -> None - let (|Call|_|) (e: FSharpExpr) = match e.E with E.Call (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None + let (|Call|_|) (e: FSharpExpr) = match e.E with E.Call (a, b, c, d, _e, f) -> Some (a, b, c, d, f) | _ -> None + let (|CallWithWitnesses|_|) (e: FSharpExpr) = match e.E with E.Call (a, b, c, d, e, f) -> Some (a, b, c, d, e, f) | _ -> None let (|NewObject|_|) (e: FSharpExpr) = match e.E with E.NewObject (a, b, c) -> Some (a, b, c) | _ -> None let (|FSharpFieldGet|_|) (e: FSharpExpr) = match e.E with E.FSharpFieldGet (a, b, c) -> Some (a, b, c) | _ -> None let (|AnonRecordGet|_|) (e: FSharpExpr) = match e.E with E.AnonRecordGet (a, b, c) -> Some (a, b, c) | _ -> None @@ -1335,4 +1394,5 @@ module BasicPatterns = let (|DecisionTreeSuccess|_|) (e: FSharpExpr) = match e.E with E.DecisionTreeSuccess (a, b) -> Some (a, b) | _ -> None let (|UnionCaseSet|_|) (e: FSharpExpr) = match e.E with E.UnionCaseSet (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None let (|TraitCall|_|) (e: FSharpExpr) = match e.E with E.TraitCall (a, b, c, d, e, f) -> Some (a, b, c, d, e, f) | _ -> None + let (|WitnessArg|_|) (e: FSharpExpr) = match e.E with E.WitnessArg n -> Some n | _ -> None diff --git a/src/fsharp/symbols/Exprs.fsi b/src/fsharp/symbols/Exprs.fsi index 488ee13e725..c585ab77c4b 100644 --- a/src/fsharp/symbols/Exprs.fsi +++ b/src/fsharp/symbols/Exprs.fsi @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.SourceCodeServices +namespace rec FSharp.Compiler.SourceCodeServices open FSharp.Compiler.CompilerImports open FSharp.Compiler.Range @@ -17,7 +17,7 @@ type public FSharpAssemblyContents = member ImplementationFiles: FSharpImplementationFileContents list /// Represents the definitional contents of a single file or fragment in an assembly, as seen by the F# language -and [] public FSharpImplementationFileContents = +type public FSharpImplementationFileContents = internal new : cenv: SymbolEnv * mimpl: TypedImplFile -> FSharpImplementationFileContents /// The qualified name acts to fully-qualify module specifications and implementations @@ -52,7 +52,8 @@ and public FSharpImplementationFileDeclaration = /// /// Pattern matching is reduced to decision trees and conditional tests. Some other /// constructs may be represented in reduced form. -and [] public FSharpExpr = +[] +type public FSharpExpr = /// The range of the expression member Range : range @@ -108,6 +109,9 @@ module public BasicPatterns = /// arguments are collapsed to a single collection of arguments, as done in the compiled version of these. val (|Call|_|) : FSharpExpr -> (FSharpExpr option * FSharpMemberOrFunctionOrValue * FSharpType list * FSharpType list * FSharpExpr list) option + /// Like Call but also indicates witness arguments + val (|CallWithWitnesses|_|) : FSharpExpr -> (FSharpExpr option * FSharpMemberOrFunctionOrValue * FSharpType list * FSharpType list * FSharpExpr list * FSharpExpr list) option + /// Matches expressions which are calls to object constructors val (|NewObject|_|) : FSharpExpr -> (FSharpMemberOrFunctionOrValue * FSharpType list * FSharpExpr list) option @@ -218,3 +222,5 @@ module public BasicPatterns = /// Matches expressions for an unresolved call to a trait val (|TraitCall|_|) : FSharpExpr -> (FSharpType list * string * MemberFlags * FSharpType list * FSharpType list * FSharpExpr list) option + /// Indicates a witness argument index from the witness arguments supplied to the enclosing method + val (|WitnessArg|_|) : FSharpExpr -> int option diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index 23b7acdec52..59b36bcc0d4 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.SourceCodeServices +namespace rec FSharp.Compiler.SourceCodeServices open System.Collections.Generic @@ -40,34 +40,37 @@ type FSharpAccessibility(a:Accessibility, ?isProtected) = | _ when List.forall isInternalCompPath p -> Internal | _ -> Private - member __.IsPublic = not isProtected && match a with TAccess [] -> true | _ -> false + member _.IsPublic = not isProtected && match a with TAccess [] -> true | _ -> false - member __.IsPrivate = not isProtected && match a with Private -> true | _ -> false + member _.IsPrivate = not isProtected && match a with Private -> true | _ -> false - member __.IsInternal = not isProtected && match a with Internal -> true | _ -> false + member _.IsInternal = not isProtected && match a with Internal -> true | _ -> false - member __.IsProtected = isProtected + member _.IsProtected = isProtected - member internal __.Contents = a + member internal _.Contents = a - override __.ToString() = + override _.ToString() = let (TAccess paths) = a let mangledTextOfCompPath (CompPath(scoref, path)) = getNameOfScopeRef scoref + "/" + textOfPath (List.map fst path) String.concat ";" (List.map mangledTextOfCompPath paths) type SymbolEnv(g: TcGlobals, thisCcu: CcuThunk, thisCcuTyp: ModuleOrNamespaceType option, tcImports: TcImports, amap: Import.ImportMap, infoReader: InfoReader) = + let tcVal = CheckExpressions.LightweightTcValForUsingInBuildMethodCall g + new(g: TcGlobals, thisCcu: CcuThunk, thisCcuTyp: ModuleOrNamespaceType option, tcImports: TcImports) = let amap = tcImports.GetImportMap() let infoReader = InfoReader(g, amap) SymbolEnv(g, thisCcu, thisCcuTyp, tcImports, amap, infoReader) - member __.g = g - member __.amap = amap - member __.thisCcu = thisCcu - member __.thisCcuTy = thisCcuTyp - member __.infoReader = infoReader - member __.tcImports = tcImports + member _.g = g + member _.amap = amap + member _.thisCcu = thisCcu + member _.thisCcuTy = thisCcuTyp + member _.infoReader = infoReader + member _.tcImports = tcImports + member _.tcValF = tcVal [] module Impl = @@ -333,7 +336,7 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol - | :? FSharpMemberFunctionOrValue as x -> Some x.Accessibility | _ -> None -and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = +type FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = inherit FSharpSymbol(cenv, (fun () -> checkEntityIsResolved entity @@ -361,22 +364,22 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | None -> false | Some ccu -> ccuEq ccu cenv.g.fslibCcu - member __.Entity = entity + member _.Entity = entity - member __.LogicalName = + member _.LogicalName = checkIsResolved() entity.LogicalName - member __.CompiledName = + member _.CompiledName = checkIsResolved() entity.CompiledName - member __.DisplayName = + member _.DisplayName = checkIsResolved() if entity.IsModuleOrNamespace then entity.DemangledModuleOrNamespaceName else entity.DisplayName - member __.AccessPath = + member _.AccessPath = checkIsResolved() match entity.CompilationPathOpt with | None -> "global" @@ -398,7 +401,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = s.FindEntityByPath cp.MangledPath | None -> None - member __.Namespace = + member _.Namespace = checkIsResolved() match entity.CompilationPathOpt with | None -> None @@ -438,7 +441,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | CompiledTypeRepr.ILAsmNamed(tref, _, _) -> Some tref.FullName | CompiledTypeRepr.ILAsmOpen _ -> None - member __.DeclarationLocation = + member _.DeclarationLocation = checkIsResolved() entity.Range @@ -446,18 +449,21 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = checkIsResolved() entity.TyparsNoRange |> List.map (fun tp -> FSharpGenericParameter(cenv, tp)) |> makeReadOnlyCollection - member __.IsMeasure = + member _.IsMeasure = isResolvedAndFSharp() && (entity.TypeOrMeasureKind = TyparKind.Measure) - member __.IsFSharpModule = + member x.IsAbstractClass = + isResolved() && isAbstractTycon entity.Deref + + member _.IsFSharpModule = isResolvedAndFSharp() && entity.IsModule - member __.HasFSharpModuleSuffix = + member _.HasFSharpModuleSuffix = isResolvedAndFSharp() && entity.IsModule && (entity.ModuleOrNamespaceType.ModuleOrNamespaceKind = ModuleOrNamespaceKind.FSharpModuleWithSuffix) - member __.IsValueType = + member _.IsValueType = isResolved() && entity.IsStructOrEnumTycon @@ -465,27 +471,28 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = isResolved() && isArrayTyconRef cenv.g entity - member __.ArrayRank = + member _.ArrayRank = checkIsResolved() rankOfArrayTyconRef cenv.g entity + #if !NO_EXTENSIONTYPING - member __.IsProvided = + member _.IsProvided = isResolved() && entity.IsProvided - member __.IsProvidedAndErased = + member _.IsProvidedAndErased = isResolved() && entity.IsProvidedErasedTycon - member __.IsStaticInstantiation = + member _.IsStaticInstantiation = isResolved() && entity.IsStaticInstantiationTycon - member __.IsProvidedAndGenerated = + member _.IsProvidedAndGenerated = isResolved() && entity.IsProvidedGeneratedTycon #endif - member __.IsClass = + member _.IsClass = isResolved() && match metadataOfTycon entity.Deref with #if !NO_EXTENSIONTYPING @@ -494,19 +501,19 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsClass | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> entity.Deref.IsFSharpClassTycon - member __.IsByRef = + member _.IsByRef = isResolved() && isByrefTyconRef cenv.g entity - member __.IsOpaque = + member _.IsOpaque = isResolved() && entity.IsHiddenReprTycon - member __.IsInterface = + member _.IsInterface = isResolved() && isInterfaceTyconRef entity - member __.IsDelegate = + member _.IsDelegate = isResolved() && match metadataOfTycon entity.Deref with #if !NO_EXTENSIONTYPING @@ -515,32 +522,32 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsDelegate | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> entity.IsFSharpDelegateTycon - member __.IsEnum = + member _.IsEnum = isResolved() && entity.IsEnumTycon - member __.IsFSharpExceptionDeclaration = + member _.IsFSharpExceptionDeclaration = isResolvedAndFSharp() && entity.IsExceptionDecl - member __.IsUnresolved = + member _.IsUnresolved = isUnresolved() - member __.IsFSharp = + member _.IsFSharp = isResolvedAndFSharp() - member __.IsFSharpAbbreviation = + member _.IsFSharpAbbreviation = isResolvedAndFSharp() && entity.IsTypeAbbrev - member __.IsFSharpRecord = + member _.IsFSharpRecord = isResolvedAndFSharp() && entity.IsRecordTycon - member __.IsFSharpUnion = + member _.IsFSharpUnion = isResolvedAndFSharp() && entity.IsUnionTycon - member __.HasAssemblyCodeRepresentation = + member _.HasAssemblyCodeRepresentation = isResolvedAndFSharp() && (entity.IsAsmReprTycon || entity.IsMeasureableReprTycon) - member __.FSharpDelegateSignature = + member _.FSharpDelegateSignature = checkIsResolved() match entity.TypeReprInfo with | TFSharpObjectRepr r when entity.IsFSharpDelegateTycon -> @@ -550,11 +557,11 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | _ -> invalidOp "not a delegate type" - member __.Accessibility = + member _.Accessibility = if isUnresolved() then FSharpAccessibility taccessPublic else FSharpAccessibility(getApproxFSharpAccessibilityOfEntity entity) - member __.RepresentationAccessibility = + member _.RepresentationAccessibility = if isUnresolved() then FSharpAccessibility taccessPublic else FSharpAccessibility(entity.TypeReprAccessibility) @@ -589,7 +596,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = GetSuperTypeOfType cenv.g cenv.amap range0 (generalizedTyconRef entity) |> Option.map (fun ty -> FSharpType(cenv, ty)) - member __.UsesPrefixDisplay = + member _.UsesPrefixDisplay = if isUnresolved() then true else not (isResolvedAndFSharp()) || entity.Deref.IsPrefixDisplay @@ -643,15 +650,15 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = yield FSharpMemberOrFunctionOrValue(cenv, V vref, Item.Value vref) ] |> makeReadOnlyCollection) - member __.XmlDocSig = + member _.XmlDocSig = checkIsResolved() getXmlDocSigForEntity cenv entity - member __.XmlDoc = + member _.XmlDoc = if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else entity.XmlDoc |> makeXmlDoc - member __.ElaboratedXmlDoc = + member _.ElaboratedXmlDoc = if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else entity.XmlDoc |> makeElaboratedXmlDoc @@ -668,7 +675,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | _ -> [| |] |> makeReadOnlyCollection - member __.NestedEntities = + member _.NestedEntities = if isUnresolved() then makeReadOnlyCollection[] else entity.ModuleOrNamespaceType.AllEntities |> QueueList.toList @@ -709,13 +716,13 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = | None -> invalidOp "not a type abbreviation" | Some ty -> FSharpType(cenv, ty) - member __.Attributes = + member _.Attributes = if isUnresolved() then makeReadOnlyCollection[] else GetAttribInfosOfEntity cenv.g cenv.amap range0 entity |> List.map (fun a -> FSharpAttribute(cenv, a)) |> makeReadOnlyCollection - member __.AllCompilationPaths = + member _.AllCompilationPaths = checkIsResolved() let (CompPath(_, parts)) = entity.CompilationPath let partsList = @@ -767,7 +774,7 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = override x.ToString() = x.CompiledName -and FSharpUnionCase(cenv, v: UnionCaseRef) = +type FSharpUnionCase(cenv, v: UnionCaseRef) = inherit FSharpSymbol (cenv, (fun () -> checkEntityIsResolved v.TyconRef @@ -786,53 +793,53 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = if v.TryUnionCase.IsNone then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) - member __.IsUnresolved = + member _.IsUnresolved = isUnresolved() - member __.Name = + member _.Name = checkIsResolved() v.UnionCase.DisplayName - member __.DeclarationLocation = + member _.DeclarationLocation = checkIsResolved() v.Range - member __.HasFields = + member _.HasFields = if isUnresolved() then false else v.UnionCase.RecdFieldsArray.Length <> 0 - member __.UnionCaseFields = + member _.UnionCaseFields = if isUnresolved() then makeReadOnlyCollection [] else v.UnionCase.RecdFieldsArray |> Array.mapi (fun i _ -> FSharpField(cenv, FSharpFieldData.Union (v, i))) |> makeReadOnlyCollection - member __.ReturnType = + member _.ReturnType = checkIsResolved() FSharpType(cenv, v.ReturnType) - member __.CompiledName = + member _.CompiledName = checkIsResolved() v.UnionCase.CompiledName - member __.XmlDocSig = + member _.XmlDocSig = checkIsResolved() let unionCase = UnionCaseInfo(generalizeTypars v.TyconRef.TyparsNoRange, v) match SymbolHelpers.GetXmlDocSigOfUnionCaseInfo unionCase with | Some (_, docsig) -> docsig | _ -> "" - member __.XmlDoc = + member _.XmlDoc = if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else v.UnionCase.XmlDoc |> makeXmlDoc - member __.ElaboratedXmlDoc = + member _.ElaboratedXmlDoc = if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else v.UnionCase.XmlDoc |> makeElaboratedXmlDoc - member __.Attributes = + member _.Attributes = if isUnresolved() then makeReadOnlyCollection [] else v.Attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection - member __.Accessibility = + member _.Accessibility = if isUnresolved() then FSharpAccessibility taccessPublic else FSharpAccessibility(v.UnionCase.Accessibility) @@ -847,7 +854,7 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = override x.ToString() = x.CompiledName -and FSharpFieldData = +type FSharpFieldData = | AnonField of AnonRecdTypeInfo * TTypes * int * range | ILField of ILFieldInfo | RecdOrClass of RecdFieldRef @@ -866,19 +873,19 @@ and FSharpFieldData = | ILField f -> Some f.DeclaringTyconRef | _ -> None -and FSharpAnonRecordTypeDetails(cenv: SymbolEnv, anonInfo: AnonRecdTypeInfo) = - member __.Assembly = FSharpAssembly (cenv, anonInfo.Assembly) +type FSharpAnonRecordTypeDetails(cenv: SymbolEnv, anonInfo: AnonRecdTypeInfo) = + member _.Assembly = FSharpAssembly (cenv, anonInfo.Assembly) /// Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) - member __.EnclosingCompiledTypeNames = anonInfo.ILTypeRef.Enclosing + member _.EnclosingCompiledTypeNames = anonInfo.ILTypeRef.Enclosing /// The name of the compiled form of the anonymous type - member __.CompiledName = anonInfo.ILTypeRef.Name + member _.CompiledName = anonInfo.ILTypeRef.Name /// The sorted labels of the anonymous type - member __.SortedFieldNames = anonInfo.SortedNames + member _.SortedFieldNames = anonInfo.SortedNames -and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = +type FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = inherit FSharpSymbol (cenv, (fun () -> match d with @@ -924,68 +931,68 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = new (cenv, rfref: RecdFieldRef) = FSharpField(cenv, FSharpFieldData.RecdOrClass rfref) - member __.DeclaringEntity = + member _.DeclaringEntity = d.TryDeclaringTyconRef |> Option.map (fun tcref -> FSharpEntity(cenv, tcref)) - member __.IsUnresolved = + member _.IsUnresolved = isUnresolved() - member __.IsMutable = + member _.IsMutable = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.IsMutable | Choice2Of3 f -> not f.IsInitOnly && f.LiteralValue.IsNone | Choice3Of3 _ -> false - member __.IsLiteral = + member _.IsLiteral = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.LiteralValue.IsSome | Choice2Of3 f -> f.LiteralValue.IsSome | Choice3Of3 _ -> false - member __.LiteralValue = + member _.LiteralValue = if isUnresolved() then None else match d.TryRecdField with | Choice1Of3 r -> getLiteralValue r.LiteralValue | Choice2Of3 f -> f.LiteralValue |> Option.map AbstractIL.ILRuntimeWriter.convFieldInit | Choice3Of3 _ -> None - member __.IsVolatile = + member _.IsVolatile = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.IsVolatile | Choice2Of3 _ -> false // F# doesn't actually respect "volatile" from other assemblies in any case | Choice3Of3 _ -> false - member __.IsDefaultValue = + member _.IsDefaultValue = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.IsZeroInit | Choice2Of3 _ -> false | Choice3Of3 _ -> false - member __.IsAnonRecordField = + member _.IsAnonRecordField = match d with | AnonField _ -> true | _ -> false - member __.AnonRecordFieldDetails = + member _.AnonRecordFieldDetails = match d with | AnonField (anonInfo, types, n, _) -> FSharpAnonRecordTypeDetails(cenv, anonInfo), [| for ty in types -> FSharpType(cenv, ty) |], n | _ -> invalidOp "not an anonymous record field" - member __.IsUnionCaseField = + member _.IsUnionCaseField = match d with | Union _ -> true | _ -> false - member __.DeclaringUnionCase = + member _.DeclaringUnionCase = match d with | Union (v, _) -> Some (FSharpUnionCase (cenv, v)) | _ -> None - member __.XmlDocSig = + member _.XmlDocSig = checkIsResolved() let xmlsig = match d with @@ -1002,7 +1009,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Some (_, docsig) -> docsig | _ -> "" - member __.XmlDoc = + member _.XmlDoc = if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else match d.TryRecdField with | Choice1Of3 r -> r.XmlDoc @@ -1010,7 +1017,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice3Of3 _ -> XmlDoc.Empty |> makeXmlDoc - member __.ElaboratedXmlDoc = + member _.ElaboratedXmlDoc = if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else match d.TryRecdField with | Choice1Of3 r -> r.XmlDoc @@ -1018,7 +1025,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice3Of3 _ -> XmlDoc.Empty |> makeElaboratedXmlDoc - member __.FieldType = + member _.FieldType = checkIsResolved() let fty = match d.TryRecdField with @@ -1027,41 +1034,41 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice3Of3 (_,tinst,n,_) -> tinst.[n] FSharpType(cenv, fty) - member __.IsStatic = + member _.IsStatic = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.IsStatic | Choice2Of3 f -> f.IsStatic | Choice3Of3 _ -> false - member __.Name = + member _.Name = checkIsResolved() match d.TryRecdField with | Choice1Of3 r -> r.Name | Choice2Of3 f -> f.FieldName | Choice3Of3 (anonInfo, _tinst, n, _) -> anonInfo.SortedNames.[n] - member __.IsCompilerGenerated = + member _.IsCompilerGenerated = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.IsCompilerGenerated | Choice2Of3 _ -> false | Choice3Of3 _ -> false - member __.IsNameGenerated = + member _.IsNameGenerated = if isUnresolved() then false else match d.TryRecdField with | Choice1Of3 r -> r.rfield_name_generated | _ -> false - member __.DeclarationLocation = + member _.DeclarationLocation = checkIsResolved() match d.TryRecdField with | Choice1Of3 r -> r.Range | Choice2Of3 _ -> range0 | Choice3Of3 (_anonInfo, _tinst, _n, m) -> m - member __.FieldAttributes = + member _.FieldAttributes = if isUnresolved() then makeReadOnlyCollection [] else match d.TryRecdField with | Choice1Of3 r -> r.FieldAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) @@ -1069,7 +1076,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice3Of3 _ -> [] |> makeReadOnlyCollection - member __.PropertyAttributes = + member _.PropertyAttributes = if isUnresolved() then makeReadOnlyCollection [] else match d.TryRecdField with | Choice1Of3 r -> r.PropertyAttribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) @@ -1077,7 +1084,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = | Choice3Of3 _ -> [] |> makeReadOnlyCollection - member __.Accessibility: FSharpAccessibility = + member _.Accessibility: FSharpAccessibility = if isUnresolved() then FSharpAccessibility taccessPublic else let access = match d.TryRecdField with @@ -1103,36 +1110,36 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = override x.ToString() = "field " + x.Name -and [] FSharpRecordField = FSharpField +type [] FSharpRecordField = FSharpField -and [] FSharpAccessibilityRights(thisCcu: CcuThunk, ad:AccessorDomain) = - member internal __.ThisCcu = thisCcu +type [] FSharpAccessibilityRights(thisCcu: CcuThunk, ad:AccessorDomain) = + member internal _.ThisCcu = thisCcu - member internal __.Contents = ad + member internal _.Contents = ad -and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, ty, n, valOpt: ValRef option, item) = +type FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, ty, n, valOpt: ValRef option, item) = inherit FSharpSymbol (cenv, (fun () -> item), (fun _ _ _ -> true)) - member __.Name = apinfo.ActiveTags.[n] + member _.Name = apinfo.ActiveTags.[n] - member __.Index = n + member _.Index = n - member __.DeclarationLocation = snd apinfo.ActiveTagsWithRanges.[n] + member _.DeclarationLocation = snd apinfo.ActiveTagsWithRanges.[n] - member __.Group = FSharpActivePatternGroup(cenv, apinfo, ty, valOpt) + member _.Group = FSharpActivePatternGroup(cenv, apinfo, ty, valOpt) - member __.XmlDoc = + member _.XmlDoc = defaultArg (valOpt |> Option.map (fun vref -> vref.XmlDoc)) XmlDoc.Empty |> makeXmlDoc - member __.ElaboratedXmlDoc = + member _.ElaboratedXmlDoc = defaultArg (valOpt |> Option.map (fun vref -> vref.XmlDoc)) XmlDoc.Empty |> makeElaboratedXmlDoc - member __.XmlDocSig = + member _.XmlDocSig = let xmlsig = match valOpt with | Some valref -> SymbolHelpers.GetXmlDocSigOfValRef cenv.g valref @@ -1141,49 +1148,49 @@ and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, ty, n, | Some (_, docsig) -> docsig | _ -> "" -and FSharpActivePatternGroup(cenv, apinfo:PrettyNaming.ActivePatternInfo, ty, valOpt) = +type FSharpActivePatternGroup(cenv, apinfo:PrettyNaming.ActivePatternInfo, ty, valOpt) = - member __.Name = valOpt |> Option.map (fun vref -> vref.LogicalName) + member _.Name = valOpt |> Option.map (fun vref -> vref.LogicalName) - member __.Names = makeReadOnlyCollection apinfo.Names + member _.Names = makeReadOnlyCollection apinfo.Names - member __.IsTotal = apinfo.IsTotal + member _.IsTotal = apinfo.IsTotal - member __.OverallType = FSharpType(cenv, ty) + member _.OverallType = FSharpType(cenv, ty) - member __.DeclaringEntity = + member _.DeclaringEntity = valOpt |> Option.bind (fun vref -> match vref.DeclaringEntity with | ParentNone -> None | Parent p -> Some (FSharpEntity(cenv, p))) -and FSharpGenericParameter(cenv, v:Typar) = +type FSharpGenericParameter(cenv, v:Typar) = inherit FSharpSymbol (cenv, (fun () -> Item.TypeVar(v.Name, v)), (fun _ _ _ad -> true)) - member __.Name = v.DisplayName + member _.Name = v.DisplayName - member __.DeclarationLocation = v.Range + member _.DeclarationLocation = v.Range - member __.IsCompilerGenerated = v.IsCompilerGenerated + member _.IsCompilerGenerated = v.IsCompilerGenerated - member __.IsMeasure = (v.Kind = TyparKind.Measure) + member _.IsMeasure = (v.Kind = TyparKind.Measure) - member __.XmlDoc = v.XmlDoc |> makeXmlDoc + member _.XmlDoc = v.XmlDoc |> makeXmlDoc - member __.ElaboratedXmlDoc = v.XmlDoc |> makeElaboratedXmlDoc + member _.ElaboratedXmlDoc = v.XmlDoc |> makeElaboratedXmlDoc - member __.IsSolveAtCompileTime = (v.StaticReq = TyparStaticReq.HeadTypeStaticReq) + member _.IsSolveAtCompileTime = (v.StaticReq = TyparStaticReq.HeadTypeStaticReq) - member __.Attributes = + member _.Attributes = // INCOMPLETENESS: If the type parameter comes from .NET then the .NET metadata for the type parameter // has been lost (it is not accessible via Typar). So we can't easily report the attributes in this // case. v.Attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection - member __.Constraints = v.Constraints |> List.map (fun a -> FSharpGenericParameterConstraint(cenv, a)) |> makeReadOnlyCollection + member _.Constraints = v.Constraints |> List.map (fun a -> FSharpGenericParameterConstraint(cenv, a)) |> makeReadOnlyCollection member internal x.V = v @@ -1197,80 +1204,80 @@ and FSharpGenericParameter(cenv, v:Typar) = override x.ToString() = "generic parameter " + x.Name -and FSharpDelegateSignature(cenv, info: SlotSig) = +type FSharpDelegateSignature(cenv, info: SlotSig) = - member __.DelegateArguments = + member _.DelegateArguments = info.FormalParams.Head |> List.map (fun (TSlotParam(nm, ty, _, _, _, _)) -> nm, FSharpType(cenv, ty)) |> makeReadOnlyCollection - member __.DelegateReturnType = + member _.DelegateReturnType = match info.FormalReturnType with | None -> FSharpType(cenv, cenv.g.unit_ty) | Some ty -> FSharpType(cenv, ty) override x.ToString() = "" -and FSharpAbstractParameter(cenv, info: SlotParam) = +type FSharpAbstractParameter(cenv, info: SlotParam) = - member __.Name = + member _.Name = let (TSlotParam(name, _, _, _, _, _)) = info name - member __.Type = FSharpType(cenv, info.Type) + member _.Type = FSharpType(cenv, info.Type) - member __.IsInArg = + member _.IsInArg = let (TSlotParam(_, _, isIn, _, _, _)) = info isIn - member __.IsOutArg = + member _.IsOutArg = let (TSlotParam(_, _, _, isOut, _, _)) = info isOut - member __.IsOptionalArg = + member _.IsOptionalArg = let (TSlotParam(_, _, _, _, isOptional, _)) = info isOptional - member __.Attributes = + member _.Attributes = let (TSlotParam(_, _, _, _, _, attribs)) = info attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection -and FSharpAbstractSignature(cenv, info: SlotSig) = +type FSharpAbstractSignature(cenv, info: SlotSig) = - member __.AbstractArguments = + member _.AbstractArguments = info.FormalParams |> List.map (List.map (fun p -> FSharpAbstractParameter(cenv, p)) >> makeReadOnlyCollection) |> makeReadOnlyCollection - member __.AbstractReturnType = + member _.AbstractReturnType = match info.FormalReturnType with | None -> FSharpType(cenv, cenv.g.unit_ty) | Some ty -> FSharpType(cenv, ty) - member __.DeclaringTypeGenericParameters = + member _.DeclaringTypeGenericParameters = info.ClassTypars |> List.map (fun t -> FSharpGenericParameter(cenv, t)) |> makeReadOnlyCollection - member __.MethodGenericParameters = + member _.MethodGenericParameters = info.MethodTypars |> List.map (fun t -> FSharpGenericParameter(cenv, t)) |> makeReadOnlyCollection - member __.Name = info.Name + member _.Name = info.Name - member __.DeclaringType = FSharpType(cenv, info.ImplementedType) + member _.DeclaringType = FSharpType(cenv, info.ImplementedType) -and FSharpGenericParameterMemberConstraint(cenv, info: TraitConstraintInfo) = +type FSharpGenericParameterMemberConstraint(cenv, info: TraitConstraintInfo) = let (TTrait(tys, nm, flags, atys, rty, _)) = info - member __.MemberSources = + member _.MemberSources = tys |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection - member __.MemberName = nm + member _.MemberName = nm - member __.MemberIsStatic = not flags.IsInstance + member _.MemberIsStatic = not flags.IsInstance - member __.MemberArgumentTypes = atys |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection + member _.MemberArgumentTypes = atys |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection member x.MemberReturnType = match rty with @@ -1279,132 +1286,132 @@ and FSharpGenericParameterMemberConstraint(cenv, info: TraitConstraintInfo) = override x.ToString() = "" -and FSharpGenericParameterDelegateConstraint(cenv, tupledArgTy: TType, rty: TType) = - member __.DelegateTupledArgumentType = FSharpType(cenv, tupledArgTy) - member __.DelegateReturnType = FSharpType(cenv, rty) +type FSharpGenericParameterDelegateConstraint(cenv, tupledArgTy: TType, rty: TType) = + member _.DelegateTupledArgumentType = FSharpType(cenv, tupledArgTy) + member _.DelegateReturnType = FSharpType(cenv, rty) override x.ToString() = "" -and FSharpGenericParameterDefaultsToConstraint(cenv, pri:int, ty:TType) = - member __.DefaultsToPriority = pri - member __.DefaultsToTarget = FSharpType(cenv, ty) +type FSharpGenericParameterDefaultsToConstraint(cenv, pri:int, ty:TType) = + member _.DefaultsToPriority = pri + member _.DefaultsToTarget = FSharpType(cenv, ty) override x.ToString() = "" -and FSharpGenericParameterConstraint(cenv, cx: TyparConstraint) = +type FSharpGenericParameterConstraint(cenv, cx: TyparConstraint) = - member __.IsCoercesToConstraint = + member _.IsCoercesToConstraint = match cx with | TyparConstraint.CoercesTo _ -> true | _ -> false - member __.CoercesToTarget = + member _.CoercesToTarget = match cx with | TyparConstraint.CoercesTo(ty, _) -> FSharpType(cenv, ty) | _ -> invalidOp "not a coerces-to constraint" - member __.IsDefaultsToConstraint = + member _.IsDefaultsToConstraint = match cx with | TyparConstraint.DefaultsTo _ -> true | _ -> false - member __.DefaultsToConstraintData = + member _.DefaultsToConstraintData = match cx with | TyparConstraint.DefaultsTo(pri, ty, _) -> FSharpGenericParameterDefaultsToConstraint(cenv, pri, ty) | _ -> invalidOp "not a 'defaults-to' constraint" - member __.IsSupportsNullConstraint = match cx with TyparConstraint.SupportsNull _ -> true | _ -> false + member _.IsSupportsNullConstraint = match cx with TyparConstraint.SupportsNull _ -> true | _ -> false - member __.IsMemberConstraint = + member _.IsMemberConstraint = match cx with | TyparConstraint.MayResolveMember _ -> true | _ -> false - member __.MemberConstraintData = + member _.MemberConstraintData = match cx with | TyparConstraint.MayResolveMember(info, _) -> FSharpGenericParameterMemberConstraint(cenv, info) | _ -> invalidOp "not a member constraint" - member __.IsNonNullableValueTypeConstraint = + member _.IsNonNullableValueTypeConstraint = match cx with | TyparConstraint.IsNonNullableStruct _ -> true | _ -> false - member __.IsReferenceTypeConstraint = + member _.IsReferenceTypeConstraint = match cx with | TyparConstraint.IsReferenceType _ -> true | _ -> false - member __.IsSimpleChoiceConstraint = + member _.IsSimpleChoiceConstraint = match cx with | TyparConstraint.SimpleChoice _ -> true | _ -> false - member __.SimpleChoices = + member _.SimpleChoices = match cx with | TyparConstraint.SimpleChoice (tys, _) -> tys |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection | _ -> invalidOp "incorrect constraint kind" - member __.IsRequiresDefaultConstructorConstraint = + member _.IsRequiresDefaultConstructorConstraint = match cx with | TyparConstraint.RequiresDefaultConstructor _ -> true | _ -> false - member __.IsEnumConstraint = + member _.IsEnumConstraint = match cx with | TyparConstraint.IsEnum _ -> true | _ -> false - member __.EnumConstraintTarget = + member _.EnumConstraintTarget = match cx with | TyparConstraint.IsEnum(ty, _) -> FSharpType(cenv, ty) | _ -> invalidOp "incorrect constraint kind" - member __.IsComparisonConstraint = + member _.IsComparisonConstraint = match cx with | TyparConstraint.SupportsComparison _ -> true | _ -> false - member __.IsEqualityConstraint = + member _.IsEqualityConstraint = match cx with | TyparConstraint.SupportsEquality _ -> true | _ -> false - member __.IsUnmanagedConstraint = + member _.IsUnmanagedConstraint = match cx with | TyparConstraint.IsUnmanaged _ -> true | _ -> false - member __.IsDelegateConstraint = + member _.IsDelegateConstraint = match cx with | TyparConstraint.IsDelegate _ -> true | _ -> false - member __.DelegateConstraintData = + member _.DelegateConstraintData = match cx with | TyparConstraint.IsDelegate(ty1, ty2, _) -> FSharpGenericParameterDelegateConstraint(cenv, ty1, ty2) | _ -> invalidOp "not a delegate constraint" override x.ToString() = "" -and FSharpInlineAnnotation = +type FSharpInlineAnnotation = | PseudoValue | AlwaysInline | OptionalInline | NeverInline | AggressiveInline -and FSharpMemberOrValData = +type FSharpMemberOrValData = | E of EventInfo | P of PropInfo | M of MethInfo | C of MethInfo | V of ValRef -and FSharpMemberOrVal = FSharpMemberOrFunctionOrValue +type FSharpMemberOrVal = FSharpMemberOrFunctionOrValue -and FSharpMemberFunctionOrValue = FSharpMemberOrFunctionOrValue +type FSharpMemberFunctionOrValue = FSharpMemberOrFunctionOrValue -and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = +type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = inherit FSharpSymbol(cenv, (fun () -> item), @@ -1452,10 +1459,10 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = else FSharpMemberFunctionOrValue(cenv, M minfo, Item.MethodGroup(minfo.LogicalName, [minfo], None)) - member __.IsUnresolved = + member _.IsUnresolved = isUnresolved() - member __.DeclarationLocationOpt = + member _.DeclarationLocationOpt = checkIsResolved() match fsharpInfo() with | Some v -> Some v.Range @@ -1491,7 +1498,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | Some v -> v | None -> failwith "DeclarationLocation property not available" - member __.DeclaringEntity = + member _.DeclaringEntity = checkIsResolved() match d with | E e -> FSharpEntity(cenv, e.DeclaringTyconRef) |> Some @@ -1502,7 +1509,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | ParentNone -> None | Parent p -> FSharpEntity(cenv, p) |> Some - member __.ApparentEnclosingEntity = + member _.ApparentEnclosingEntity = checkIsResolved() match d with | E e -> FSharpEntity(cenv, e.ApparentEnclosingTyconRef) @@ -1536,7 +1543,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V v -> v.TauType FSharpType(cenv, ty) - member __.HasGetterMethod = + member _.HasGetterMethod = if isUnresolved() then false else match d with @@ -1546,13 +1553,13 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | C _ | V _ -> false - member __.GetterMethod = + member _.GetterMethod = checkIsResolved() match d with | P p -> mkMethSym p.GetterMethod | E _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated getter method" - member __.HasSetterMethod = + member _.HasSetterMethod = if isUnresolved() then false else match d with @@ -1562,31 +1569,31 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | C _ | V _ -> false - member __.SetterMethod = + member _.SetterMethod = checkIsResolved() match d with | P p -> mkMethSym p.SetterMethod | E _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated setter method" - member __.EventAddMethod = + member _.EventAddMethod = checkIsResolved() match d with | E e -> mkMethSym e.AddMethod | P _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated add method" - member __.EventRemoveMethod = + member _.EventRemoveMethod = checkIsResolved() match d with | E e -> mkMethSym e.RemoveMethod | P _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated remove method" - member __.EventDelegateType = + member _.EventDelegateType = checkIsResolved() match d with | E e -> FSharpType(cenv, e.GetDelegateType(cenv.amap, range0)) | P _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated event delegate type" - member __.EventIsStandard = + member _.EventIsStandard = checkIsResolved() match d with | E e -> @@ -1594,14 +1601,14 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = TryDestStandardDelegateType cenv.infoReader range0 AccessibleFromSomewhere dty |> Option.isSome | P _ | M _ | C _ | V _ -> invalidOp "the value or member is not an event" - member __.IsCompilerGenerated = + member _.IsCompilerGenerated = if isUnresolved() then false else match fsharpInfo() with | None -> false | Some v -> v.IsCompilerGenerated - member __.InlineAnnotation = + member _.InlineAnnotation = if isUnresolved() then FSharpInlineAnnotation.OptionalInline else match fsharpInfo() with | None -> FSharpInlineAnnotation.OptionalInline @@ -1612,25 +1619,25 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | ValInline.Optional -> FSharpInlineAnnotation.OptionalInline | ValInline.Never -> FSharpInlineAnnotation.NeverInline - member __.IsMutable = + member _.IsMutable = if isUnresolved() then false else match d with | M _ | C _ | P _ | E _ -> false | V v -> v.IsMutable - member __.IsModuleValueOrMember = + member _.IsModuleValueOrMember = if isUnresolved() then false else match d with | M _ | C _ | P _ | E _ -> true | V v -> v.IsMember || v.IsModuleBinding - member __.IsMember = + member _.IsMember = if isUnresolved() then false else match d with | M _ | C _ | P _ | E _ -> true | V v -> v.IsMember - member __.IsDispatchSlot = + member _.IsDispatchSlot = if isUnresolved() then false else match d with | E e -> e.AddMethod.IsDispatchSlot @@ -1661,7 +1668,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | _ -> None | _ -> None - member __.IsEventAddMethod = + member _.IsEventAddMethod = if isUnresolved() then false else match d with | M m when m.LogicalName.StartsWithOrdinal("add_") -> @@ -1675,7 +1682,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | _ -> false - member __.IsEventRemoveMethod = + member _.IsEventRemoveMethod = if isUnresolved() then false else match d with | M m when m.LogicalName.StartsWithOrdinal("remove_") -> @@ -1702,7 +1709,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | None -> false | Some v -> v.IsPropertySetterMethod - member __.IsPropertyGetterMethod = + member _.IsPropertyGetterMethod = if isUnresolved() then false else match d with | M m when m.LogicalName.StartsWithOrdinal("get_") -> @@ -1712,7 +1719,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V v -> v.IsPropertyGetterMethod | _ -> false - member __.IsPropertySetterMethod = + member _.IsPropertySetterMethod = if isUnresolved() then false else match d with // Look for a matching property with the right name. @@ -1723,7 +1730,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V v -> v.IsPropertySetterMethod | _ -> false - member __.IsInstanceMember = + member _.IsInstanceMember = if isUnresolved() then false else match d with | E e -> not e.IsStatic @@ -1740,7 +1747,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> match m.ArbitraryValRef with Some vref -> ValRefIsCompiledAsInstanceMember cenv.g vref | None -> true | V vref -> ValRefIsCompiledAsInstanceMember cenv.g vref - member __.IsExtensionMember = + member _.IsExtensionMember = if isUnresolved() then false else match d with | E e -> e.AddMethod.IsExtensionMember @@ -1751,7 +1758,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member x.IsOverrideOrExplicitMember = x.IsOverrideOrExplicitInterfaceImplementation - member __.IsOverrideOrExplicitInterfaceImplementation = + member _.IsOverrideOrExplicitInterfaceImplementation = if isUnresolved() then false else match d with | E e -> e.AddMethod.IsDefiniteFSharpOverride @@ -1761,7 +1768,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = v.MemberInfo.IsSome && v.IsDefiniteFSharpOverrideMember | C _ -> false - member __.IsExplicitInterfaceImplementation = + member _.IsExplicitInterfaceImplementation = if isUnresolved() then false else match d with | E e -> e.AddMethod.IsFSharpExplicitInterfaceImplementation @@ -1770,7 +1777,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V v -> v.IsFSharpExplicitInterfaceImplementation cenv.g | C _ -> false - member __.ImplementedAbstractSignatures = + member _.ImplementedAbstractSignatures = checkIsResolved() let sigs = match d with @@ -1781,19 +1788,19 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = sigs |> List.map (fun s -> FSharpAbstractSignature (cenv, s)) |> makeReadOnlyCollection - member __.IsImplicitConstructor = + member _.IsImplicitConstructor = if isUnresolved() then false else match fsharpInfo() with | None -> false | Some v -> v.IsIncrClassConstructor - member __.IsTypeFunction = + member _.IsTypeFunction = if isUnresolved() then false else match fsharpInfo() with | None -> false | Some v -> v.IsTypeFunction - member __.IsActivePattern = + member _.IsActivePattern = if isUnresolved() then false else match fsharpInfo() with | Some v -> PrettyNaming.ActivePatternInfoOfValName v.CoreDisplayName v.Range |> Option.isSome @@ -1805,7 +1812,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | Some v -> v.CompiledName cenv.g.CompilerGlobalState | None -> x.LogicalName - member __.LogicalName = + member _.LogicalName = checkIsResolved() match d with | E e -> e.EventName @@ -1813,7 +1820,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> m.LogicalName | V v -> v.LogicalName - member __.DisplayName = + member _.DisplayName = checkIsResolved() match d with | E e -> e.EventName @@ -1821,22 +1828,22 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> m.DisplayName | V v -> v.DisplayName - member __.XmlDocSig = + member sym.XmlDocSig = checkIsResolved() match d with | E e -> - let range = defaultArg __.DeclarationLocationOpt range0 + let range = defaultArg sym.DeclarationLocationOpt range0 match SymbolHelpers.GetXmlDocSigOfEvent cenv.infoReader range e with | Some (_, docsig) -> docsig | _ -> "" | P p -> - let range = defaultArg __.DeclarationLocationOpt range0 + let range = defaultArg sym.DeclarationLocationOpt range0 match SymbolHelpers.GetXmlDocSigOfProp cenv.infoReader range p with | Some (_, docsig) -> docsig | _ -> "" | M m | C m -> - let range = defaultArg __.DeclarationLocationOpt range0 + let range = defaultArg sym.DeclarationLocationOpt range0 match SymbolHelpers.GetXmlDocSigOfMethInfo cenv.infoReader range m with | Some (_, docsig) -> docsig | _ -> "" @@ -1848,7 +1855,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | _ -> "" | ParentNone -> "" - member __.XmlDoc = + member _.XmlDoc = if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else match d with | E e -> e.XmlDoc |> makeXmlDoc @@ -1856,7 +1863,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> m.XmlDoc |> makeXmlDoc | V v -> v.XmlDoc |> makeXmlDoc - member __.ElaboratedXmlDoc = + member _.ElaboratedXmlDoc = if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else match d with | E e -> e.XmlDoc |> makeElaboratedXmlDoc @@ -1872,7 +1879,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = // INCOMPLETENESS: Attribs is empty here, so we can't look at attributes for // either .NET or F# parameters let argInfo: ArgReprInfo = { Name=nmOpt; Attribs= [] } - yield FSharpParameter(cenv, pty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional) ] + yield FSharpParameter(cenv, pty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional, false) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1884,7 +1891,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = // INCOMPLETENESS: Attribs is empty here, so we can't look at attributes for // either .NET or F# parameters let argInfo: ArgReprInfo = { Name=nmOpt; Attribs= [] } - yield FSharpParameter(cenv, pty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional) ] + yield FSharpParameter(cenv, pty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional, false) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1916,7 +1923,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = let isInArg = HasFSharpAttribute cenv.g cenv.g.attrib_InAttribute argInfo.Attribs && isByrefTy cenv.g argty let isOutArg = HasFSharpAttribute cenv.g cenv.g.attrib_OutAttribute argInfo.Attribs && isByrefTy cenv.g argty let isOptionalArg = HasFSharpAttribute cenv.g cenv.g.attrib_OptionalArgumentAttribute argInfo.Attribs - yield FSharpParameter(cenv, argty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) ] + yield FSharpParameter(cenv, argty, argInfo, None, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg, false) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1952,7 +1959,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt) - member __.Attributes = + member _.Attributes = if isUnresolved() then makeReadOnlyCollection [] else let m = range0 match d with @@ -1967,28 +1974,28 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = |> makeReadOnlyCollection /// Is this "base" in "base.M(...)" - member __.IsBaseValue = + member _.IsBaseValue = if isUnresolved() then false else match d with | M _ | C _ | P _ | E _ -> false | V v -> v.BaseOrThisInfo = BaseVal /// Is this the "x" in "type C() as x = ..." - member __.IsConstructorThisValue = + member _.IsConstructorThisValue = if isUnresolved() then false else match d with | M _ | C _| P _ | E _ -> false | V v -> v.BaseOrThisInfo = CtorThisVal /// Is this the "x" in "member x.M = ..." - member __.IsMemberThisValue = + member _.IsMemberThisValue = if isUnresolved() then false else match d with | M _ | C _ | P _ | E _ -> false | V v -> v.BaseOrThisInfo = MemberThisVal /// Is this a [] value, and if so what value? (may be null) - member __.LiteralValue = + member _.LiteralValue = if isUnresolved() then None else match d with | M _ | C _ | P _ | E _ -> None @@ -2092,8 +2099,35 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V v -> v.TauType NicePrint.prettyLayoutOfTypeNoCx (context.Contents cenv.g) ty - -and FSharpType(cenv, ty:TType) = + member x.GetWitnessPassingInfo() = + let witnessInfos = + match d with + | M (FSMeth(_, _, vref, _)) -> + let _tps, witnessInfos, _curriedArgInfos, _retTy, _ = GetTypeOfMemberInMemberForm cenv.g vref + witnessInfos + | V vref -> + let arities = arityOfVal vref.Deref + let numEnclosingTypars = CountEnclosingTyparsOfActualParentOfVal vref.Deref + let _tps, witnessInfos, _curriedArgInfos, _retTy, _ = GetTopValTypeInCompiledForm cenv.g arities numEnclosingTypars vref.Type vref.DefinitionRange + witnessInfos + | E _ | P _ | M _ | C _ -> [] + match witnessInfos with + | [] -> None + | _ when not (cenv.g.langVersion.SupportsFeature(Features.LanguageFeature.WitnessPassing)) -> None + | _ -> + let witnessParams = + ((Set.empty, 0), witnessInfos) ||> List.mapFold (fun (used,i) witnessInfo -> + let paramTy = GenWitnessTy cenv.g witnessInfo + let nm = String.uncapitalize witnessInfo.MemberName + let nm = if used.Contains nm then nm + string i else nm + let argReprInfo : ArgReprInfo = { Attribs=[]; Name=Some (mkSynId x.DeclarationLocation nm) } + let p = FSharpParameter(cenv, paramTy, argReprInfo, None, None, false, false, false, false, true) + p, (used.Add nm, i + 1)) + |> fst + let witnessMethName = PrettyNaming.ExtraWitnessMethodName x.CompiledName + Some (witnessMethName, makeReadOnlyCollection witnessParams) + +type FSharpType(cenv, ty:TType) = let isUnresolved() = ErrorLogger.protectAssemblyExploration true <| fun () -> @@ -2109,23 +2143,23 @@ and FSharpType(cenv, ty:TType) = new (g, thisCcu, thisCcuTyp, tcImports, ty) = FSharpType(SymbolEnv(g, thisCcu, Some thisCcuTyp, tcImports), ty) - member __.IsUnresolved = isUnresolved() + member _.IsUnresolved = isUnresolved() - member __.HasTypeDefinition = + member _.HasTypeDefinition = isResolved() && protect <| fun () -> match stripTyparEqns ty with | TType_app _ | TType_measure (Measure.Con _ | Measure.Prod _ | Measure.Inv _ | Measure.One _) -> true | _ -> false - member __.IsTupleType = + member _.IsTupleType = isResolved() && protect <| fun () -> match stripTyparEqns ty with | TType_tuple _ -> true | _ -> false - member __.IsStructTupleType = + member _.IsStructTupleType = isResolved() && protect <| fun () -> match stripTyparEqns ty with @@ -2135,7 +2169,7 @@ and FSharpType(cenv, ty:TType) = member x.IsNamedType = x.HasTypeDefinition member x.NamedEntity = x.TypeDefinition - member __.TypeDefinition = + member _.TypeDefinition = protect <| fun () -> match stripTyparEqns ty with | TType_app (tcref, _) -> FSharpEntity(cenv, tcref) @@ -2145,7 +2179,7 @@ and FSharpType(cenv, ty:TType) = | TType_measure (Measure.Inv _) -> FSharpEntity(cenv, cenv.g.measureinverse_tcr) | _ -> invalidOp "not a named type" - member __.GenericArguments = + member _.GenericArguments = protect <| fun () -> match stripTyparEqns ty with | TType_anon (_, tyargs) @@ -2159,7 +2193,7 @@ and FSharpType(cenv, ty:TType) = | _ -> invalidOp "not a named type" (* - member __.ProvidedArguments = + member _.ProvidedArguments = let typeName, argNamesAndValues = try PrettyNaming.demangleProvidedTypeName typeLogicalName @@ -2170,37 +2204,37 @@ and FSharpType(cenv, ty:TType) = member ty.IsAbbreviation = isResolved() && ty.HasTypeDefinition && ty.TypeDefinition.IsFSharpAbbreviation - member __.AbbreviatedType = + member _.AbbreviatedType = protect <| fun () -> FSharpType(cenv, stripTyEqns cenv.g ty) - member __.IsFunctionType = + member _.IsFunctionType = isResolved() && protect <| fun () -> match stripTyparEqns ty with | TType_fun _ -> true | _ -> false - member __.IsAnonRecordType = + member _.IsAnonRecordType = isResolved() && protect <| fun () -> match stripTyparEqns ty with | TType_anon _ -> true | _ -> false - member __.AnonRecordTypeDetails = + member _.AnonRecordTypeDetails = protect <| fun () -> match stripTyparEqns ty with | TType_anon (anonInfo, _) -> FSharpAnonRecordTypeDetails(cenv, anonInfo) | _ -> invalidOp "not an anonymous record type" - member __.IsGenericParameter = + member _.IsGenericParameter = protect <| fun () -> match stripTyparEqns ty with | TType_var _ -> true | TType_measure (Measure.Var _) -> true | _ -> false - member __.GenericParameter = + member _.GenericParameter = protect <| fun () -> match stripTyparEqns ty with | TType_var tp @@ -2308,7 +2342,7 @@ and FSharpType(cenv, ty:TType) = let ps = (xs, prettyTys) ||> List.map2 (List.map2 (fun p pty -> p.AdjustType pty)) |> List.map makeReadOnlyCollection |> makeReadOnlyCollection ps, returnParameter.AdjustType prettyRetTy -and FSharpAttribute(cenv: SymbolEnv, attrib: AttribInfo) = +type FSharpAttribute(cenv: SymbolEnv, attrib: AttribInfo) = let rec resolveArgObj (arg: obj) = match arg with @@ -2316,22 +2350,22 @@ and FSharpAttribute(cenv: SymbolEnv, attrib: AttribInfo) = | :? (obj[]) as a -> a |> Array.map resolveArgObj |> box | _ -> arg - member __.AttributeType = + member _.AttributeType = FSharpEntity(cenv, attrib.TyconRef) - member __.IsUnresolved = entityIsUnresolved(attrib.TyconRef) + member _.IsUnresolved = entityIsUnresolved(attrib.TyconRef) - member __.ConstructorArguments = + member _.ConstructorArguments = attrib.ConstructorArguments |> List.map (fun (ty, obj) -> FSharpType(cenv, ty), resolveArgObj obj) |> makeReadOnlyCollection - member __.NamedArguments = + member _.NamedArguments = attrib.NamedArguments |> List.map (fun (ty, nm, isField, obj) -> FSharpType(cenv, ty), nm, isField, resolveArgObj obj) |> makeReadOnlyCollection - member __.Format(context: FSharpDisplayContext) = + member _.Format(context: FSharpDisplayContext) = protect <| fun () -> match attrib with | AttribInfo.FSAttribInfo(g, attrib) -> @@ -2340,10 +2374,13 @@ and FSharpAttribute(cenv: SymbolEnv, attrib: AttribInfo) = let parms, _args = decodeILAttribData g.ilg cattr NicePrint.stringOfILAttrib (context.Contents g) (cattr.Method.DeclaringType, parms) - override __.ToString() = + member _.Range = attrib.Range + + override _.ToString() = if entityIsUnresolved attrib.TyconRef then "attribute ???" else "attribute " + attrib.TyconRef.CompiledName + "(...)" + #if !NO_EXTENSIONTYPING -and FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterInfo >, m) = +type FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterInfo >, m) = inherit FSharpSymbol(cenv, (fun () -> protect <| fun () -> @@ -2352,26 +2389,28 @@ and FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterIn Item.ArgName((mkSynId m nm, spKind, None))), (fun _ _ _ -> true)) - member __.Name = + member _.Name = protect <| fun () -> sp.PUntaint((fun p -> p.Name), m) - member __.DeclarationLocation = m + member _.DeclarationLocation = m - member __.Kind = + member _.Kind = protect <| fun () -> let ty = Import.ImportProvidedType cenv.amap m (sp.PApply((fun x -> x.ParameterType), m)) FSharpType(cenv, ty) - member __.IsOptional = + member _.IsOptional = protect <| fun () -> sp.PUntaint((fun x -> x.IsOptional), m) - member __.HasDefaultValue = + member _.HasDefaultValue = protect <| fun () -> sp.PUntaint((fun x -> x.HasDefaultValue), m) - member __.DefaultValue = + member _.DefaultValue = protect <| fun () -> sp.PUntaint((fun x -> x.RawDefaultValue), m) + member _.Range = m + override x.Equals(other: obj) = box x === other || match other with @@ -2383,7 +2422,7 @@ and FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterIn "static parameter " + x.Name #endif -and FSharpParameter(cenv, paramTy: TType, topArgInfo: ArgReprInfo, ownerOpt, ownerRangeOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) = +type FSharpParameter(cenv, paramTy: TType, topArgInfo: ArgReprInfo, ownerOpt, ownerRangeOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg, isWitnessArg) = inherit FSharpSymbol(cenv, (fun () -> let m = defaultArg ownerRangeOpt range0 @@ -2393,22 +2432,22 @@ and FSharpParameter(cenv, paramTy: TType, topArgInfo: ArgReprInfo, ownerOpt, own new (cenv, id, ty, container) = let argInfo: ArgReprInfo = { Name = Some id; Attribs = [] } - FSharpParameter(cenv, ty, argInfo, container, None, false, false, false, false) + FSharpParameter(cenv, ty, argInfo, container, None, false, false, false, false, false) new (cenv, ty, argInfo: ArgReprInfo, ownerRangeOpt) = - FSharpParameter(cenv, ty, argInfo, None, ownerRangeOpt, false, false, false, false) + FSharpParameter(cenv, ty, argInfo, None, ownerRangeOpt, false, false, false, false, false) - member __.Name = match topArgInfo.Name with None -> None | Some v -> Some v.idText + member _.Name = match topArgInfo.Name with None -> None | Some v -> Some v.idText - member __.cenv: SymbolEnv = cenv + member _.cenv: SymbolEnv = cenv - member __.AdjustType ty = FSharpParameter(cenv, ty, topArgInfo, ownerOpt, ownerRangeOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) + member _.AdjustType ty = FSharpParameter(cenv, ty, topArgInfo, ownerOpt, ownerRangeOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg, isWitnessArg) - member __.Type: FSharpType = FSharpType(cenv, paramTy) + member _.Type: FSharpType = FSharpType(cenv, paramTy) - member __.V = paramTy + member _.V = paramTy - member __.DeclarationLocation = + member _.DeclarationLocation = match topArgInfo.Name with | Some v -> v.idRange | None -> @@ -2417,21 +2456,23 @@ and FSharpParameter(cenv, paramTy: TType, topArgInfo: ArgReprInfo, ownerOpt, own | Some m -> m | None -> range0 - member __.Owner = + member _.Owner = match ownerOpt with | Some (ArgumentContainer.Method minfo) -> Some (FSharpMemberOrFunctionOrValue (cenv, minfo) :> FSharpSymbol) | _ -> None - member __.Attributes = + member _.Attributes = topArgInfo.Attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection - member __.IsParamArrayArg = isParamArrayArg + member _.IsParamArrayArg = isParamArrayArg - member __.IsInArg = isInArg + member _.IsInArg = isInArg - member __.IsOutArg = isOutArg + member _.IsOutArg = isOutArg - member __.IsOptionalArg = isOptionalArg + member _.IsOptionalArg = isOptionalArg + + member _.IsWitnessArg = isWitnessArg member private x.ValReprInfo = topArgInfo @@ -2446,7 +2487,7 @@ and FSharpParameter(cenv, paramTy: TType, topArgInfo: ArgReprInfo, ownerOpt, own override x.ToString() = "parameter " + (match x.Name with None -> " s) -and FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: CcuThunk option, mtyp: ModuleOrNamespaceType) = +type FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: CcuThunk option, mtyp: ModuleOrNamespaceType) = // Assembly signature for a referenced/linked assembly new (cenv: SymbolEnv, ccu: CcuThunk) = @@ -2457,7 +2498,7 @@ and FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: new (tcGlobals, thisCcu, thisCcuTyp, tcImports, topAttribs, contents) = FSharpAssemblySignature(SymbolEnv(tcGlobals, thisCcu, Some thisCcuTyp, tcImports), topAttribs, None, contents) - member __.Entities = + member _.Entities = let rec loop (rmtyp: ModuleOrNamespaceType) = [| for entity in rmtyp.AllEntities do @@ -2469,7 +2510,7 @@ and FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: loop mtyp |> makeReadOnlyCollection - member __.Attributes = + member _.Attributes = [ match optViewedCcu with | Some ccu -> match ccu.TryGetILModuleDef() with @@ -2490,7 +2531,7 @@ and FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: | Some tA -> for a in tA.assemblyAttrs do yield FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a)) ] |> makeReadOnlyCollection - member __.FindEntityByPath path = + member _.FindEntityByPath path = let findNested name entity = match entity with | Some (e: Entity) ->e.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind name @@ -2505,26 +2546,26 @@ and FSharpAssemblySignature (cenv, topAttribs: TopAttribs option, optViewedCcu: override x.ToString() = "" -and FSharpAssembly internal (cenv, ccu: CcuThunk) = +type FSharpAssembly internal (cenv, ccu: CcuThunk) = new (tcGlobals, tcImports, ccu: CcuThunk) = FSharpAssembly(SymbolEnv(tcGlobals, ccu, None, tcImports), ccu) - member __.RawCcuThunk = ccu + member _.RawCcuThunk = ccu - member __.QualifiedName = match ccu.QualifiedName with None -> "" | Some s -> s + member _.QualifiedName = match ccu.QualifiedName with None -> "" | Some s -> s - member __.CodeLocation = ccu.SourceCodeDirectory + member _.CodeLocation = ccu.SourceCodeDirectory - member __.FileName = ccu.FileName + member _.FileName = ccu.FileName - member __.SimpleName = ccu.AssemblyName + member _.SimpleName = ccu.AssemblyName #if !NO_EXTENSIONTYPING - member __.IsProviderGenerated = ccu.IsProviderGenerated + member _.IsProviderGenerated = ccu.IsProviderGenerated #endif - member __.Contents : FSharpAssemblySignature = FSharpAssemblySignature(cenv, ccu) + member _.Contents : FSharpAssemblySignature = FSharpAssemblySignature(cenv, ccu) override x.ToString() = match ccu.ILScopeRef with @@ -2537,9 +2578,9 @@ and FSharpAssembly internal (cenv, ccu: CcuThunk) = [] type FSharpOpenDeclaration(target: SynOpenDeclTarget, range: range option, modules: FSharpEntity list, types: FSharpType list, appliedScope: range, isOwnNamespace: bool) = - member __.Target = target + member _.Target = target - member __.LongId = + member _.LongId = match target with | SynOpenDeclTarget.ModuleOrNamespace(longId, _) -> longId | SynOpenDeclTarget.Type(synType, _) -> @@ -2552,36 +2593,36 @@ type FSharpOpenDeclaration(target: SynOpenDeclTarget, range: range option, modul | _ -> [] get synType - member __.Range = range + member _.Range = range - member __.Types = types + member _.Types = types - member __.Modules = modules + member _.Modules = modules - member __.AppliedScope = appliedScope + member _.AppliedScope = appliedScope - member __.IsOwnNamespace = isOwnNamespace + member _.IsOwnNamespace = isOwnNamespace [] type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc, range: range) = - member __.Symbol = symbol + member _.Symbol = symbol - member __.DisplayContext = FSharpDisplayContext(fun _ -> denv) + member _.DisplayContext = FSharpDisplayContext(fun _ -> denv) member x.IsDefinition = x.IsFromDefinition - member __.IsFromDefinition = itemOcc = ItemOccurence.Binding + member _.IsFromDefinition = itemOcc = ItemOccurence.Binding - member __.IsFromPattern = itemOcc = ItemOccurence.Pattern + member _.IsFromPattern = itemOcc = ItemOccurence.Pattern - member __.IsFromType = itemOcc = ItemOccurence.UseInType + member _.IsFromType = itemOcc = ItemOccurence.UseInType - member __.IsFromAttribute = itemOcc = ItemOccurence.UseInAttribute + member _.IsFromAttribute = itemOcc = ItemOccurence.UseInAttribute - member __.IsFromDispatchSlotImplementation = itemOcc = ItemOccurence.Implemented + member _.IsFromDispatchSlotImplementation = itemOcc = ItemOccurence.Implemented - member __.IsFromComputationExpression = + member _.IsFromComputationExpression = match symbol.Item, itemOcc with // 'seq' in 'seq { ... }' gets colored as keywords | (Item.Value vref), ItemOccurence.Use when valRefEq g g.seq_vref vref -> true @@ -2589,13 +2630,13 @@ type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc | (Item.CustomBuilder _ | Item.CustomOperation _), ItemOccurence.Use -> true | _ -> false - member __.IsFromOpenStatement = itemOcc = ItemOccurence.Open + member _.IsFromOpenStatement = itemOcc = ItemOccurence.Open - member __.FileName = range.FileName + member _.FileName = range.FileName - member __.Range = Range.toZ range + member _.Range = Range.toZ range - member __.RangeAlternate = range + member _.RangeAlternate = range member this.IsPrivateToFile = let isPrivate = @@ -2622,4 +2663,4 @@ type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc isPrivate && declaredInTheFile - override __.ToString() = sprintf "%O, %O, %O" symbol itemOcc range + override _.ToString() = sprintf "%O, %O, %O" symbol itemOcc range diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi index 6e1a53d6003..f364f2c1f36 100644 --- a/src/fsharp/symbols/Symbols.fsi +++ b/src/fsharp/symbols/Symbols.fsi @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.SourceCodeServices +namespace rec FSharp.Compiler.SourceCodeServices open System.Collections.Generic @@ -23,9 +23,10 @@ type internal SymbolEnv = new: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType option * tcImports: TcImports * amap: ImportMap * infoReader: InfoReader -> SymbolEnv member amap: ImportMap member g: TcGlobals + member tcValF: ConstraintSolver.TcValF /// Indicates the accessibility of a symbol, as seen by the F# language -type public FSharpAccessibility = +type FSharpAccessibility = internal new: Accessibility * ?isProtected: bool -> FSharpAccessibility /// Indicates the symbol has public accessibility. @@ -49,8 +50,8 @@ type public FSharpAccessibility = /// /// Acquired via GetDisplayEnvAtLocationAlternate and similar methods. May be passed /// to the Format method on FSharpType and other methods. -type [] public FSharpDisplayContext = - internal new : denv: (TcGlobals -> DisplayEnv) -> FSharpDisplayContext +type FSharpDisplayContext = + internal new: denv: (TcGlobals -> DisplayEnv) -> FSharpDisplayContext static member Empty: FSharpDisplayContext member WithShortTypeNames: bool -> FSharpDisplayContext @@ -60,7 +61,8 @@ type [] public FSharpDisplayContext = /// The subtype of the symbol may reveal further information and can be one of FSharpEntity, FSharpUnionCase /// FSharpField, FSharpGenericParameter, FSharpStaticParameter, FSharpMemberOrFunctionOrValue, FSharpParameter, /// or FSharpActivePatternCase. -type [] public FSharpSymbol = +[] +type FSharpSymbol = static member internal Create: g: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * item: NameResolution.Item -> FSharpSymbol static member internal Create: cenv: SymbolEnv * item: NameResolution.Item -> FSharpSymbol @@ -95,19 +97,19 @@ type [] public FSharpSymbol = /// are considered to be effectively the same symbol as the corresponding type definition. /// /// This is the relation used by GetUsesOfSymbol and GetUsesOfSymbolInFile. - member IsEffectivelySameAs : other: FSharpSymbol -> bool + member IsEffectivelySameAs: other: FSharpSymbol -> bool /// A hash compatible with the IsEffectivelySameAs relation - member GetEffectivelySameAsHash : unit -> int + member GetEffectivelySameAsHash: unit -> int - member IsExplicitlySuppressed : bool + member IsExplicitlySuppressed: bool - static member GetAccessibility : FSharpSymbol -> FSharpAccessibility option + static member GetAccessibility: FSharpSymbol -> FSharpAccessibility option /// Represents an assembly as seen by the F# language -and [] public FSharpAssembly = +type FSharpAssembly = - internal new : tcGlobals: TcGlobals * tcImports: TcImports * ccu: CcuThunk -> FSharpAssembly + internal new: tcGlobals: TcGlobals * tcImports: TcImports * ccu: CcuThunk -> FSharpAssembly /// The qualified name of the assembly member QualifiedName: string @@ -119,19 +121,19 @@ and [] public FSharpAssembly = member Contents: FSharpAssemblySignature /// The file name for the assembly, if any - member FileName : string option + member FileName: string option /// The simple name for the assembly - member SimpleName : string + member SimpleName: string #if !NO_EXTENSIONTYPING /// Indicates if the assembly was generated by a type provider and is due for static linking - member IsProviderGenerated : bool + member IsProviderGenerated: bool #endif /// Represents an inferred signature of part of an assembly as seen by the F# language -and [] public FSharpAssemblySignature = +type FSharpAssemblySignature = - internal new : tcGlobals: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * topAttribs: TopAttribs option * contents: ModuleOrNamespaceType -> FSharpAssemblySignature + internal new: tcGlobals: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * topAttribs: TopAttribs option * contents: ModuleOrNamespaceType -> FSharpAssemblySignature /// The (non-nested) module and type definitions in this signature member Entities: IList @@ -145,13 +147,13 @@ and [] public FSharpAssemblySignature = /// A subtype of FSharpSymbol that represents a type definition or module as seen by the F# language -and [] public FSharpEntity = +type FSharpEntity = inherit FSharpSymbol - internal new : SymbolEnv * EntityRef -> FSharpEntity + internal new: SymbolEnv * EntityRef -> FSharpEntity /// Get the enclosing entity for the definition - member DeclaringEntity : FSharpEntity option + member DeclaringEntity: FSharpEntity option /// Get the name of the type or module, possibly with `n mangling member LogicalName: string @@ -183,34 +185,34 @@ and [] public FSharpEntity = member DeclarationLocation: range /// Indicates if the entity is a measure, type or exception abbreviation - member IsFSharpAbbreviation : bool + member IsFSharpAbbreviation: bool /// Indicates if the entity is record type - member IsFSharpRecord : bool + member IsFSharpRecord: bool /// Indicates if the entity is union type - member IsFSharpUnion : bool + member IsFSharpUnion: bool /// Indicates if the entity is a struct or enum - member IsValueType : bool + member IsValueType: bool /// Indicates if the entity is an array type - member IsArrayType : bool + member IsArrayType: bool /// Get the rank of an array type - member ArrayRank : int + member ArrayRank: int #if !NO_EXTENSIONTYPING /// Indicates if the entity is a 'fake' symbol related to a static instantiation of a type provider - member IsStaticInstantiation : bool + member IsStaticInstantiation: bool /// Indicates if the entity is a provided type - member IsProvided : bool + member IsProvided: bool /// Indicates if the entity is an erased provided type - member IsProvidedAndErased : bool + member IsProvidedAndErased: bool /// Indicates if the entity is a generated provided type - member IsProvidedAndGenerated : bool + member IsProvidedAndGenerated: bool #endif /// Indicates if the entity is an F# module definition member IsFSharpModule: bool @@ -222,40 +224,43 @@ and [] public FSharpEntity = member StaticParameters: IList #endif /// Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup - member HasFSharpModuleSuffix : bool + member HasFSharpModuleSuffix: bool /// Indicates if the entity is a measure definition member IsMeasure: bool + /// Indicates if the entity is an abstract class + member IsAbstractClass: bool + /// Indicates an F# exception declaration member IsFSharpExceptionDeclaration: bool /// Indicates if this is a reference to something in an F#-compiled assembly - member IsFSharp : bool + member IsFSharp: bool /// Indicates if the entity is in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// Indicates if the entity is a class type definition - member IsClass : bool + member IsClass: bool /// Indicates if is the 'byref<_>' type definition used for byref types in F#-compiled assemblies - member IsByRef : bool + member IsByRef: bool /// Indicates if the entity is a type definition for a reference type where the implementation details are hidden by a signature - member IsOpaque : bool + member IsOpaque: bool /// Indicates if the entity is an enum type definition - member IsEnum : bool + member IsEnum: bool /// Indicates if the entity is a delegate type definition - member IsDelegate : bool + member IsDelegate: bool /// Indicates if the entity is an interface type definition - member IsInterface : bool + member IsInterface: bool /// Indicates if the entity is a part of a namespace path - member IsNamespace : bool + member IsNamespace: bool /// Get the in-memory XML documentation for the entity, used when code is checked in-memory member XmlDoc: IList @@ -278,42 +283,42 @@ and [] public FSharpEntity = member Attributes: IList /// Get the declared interface implementations - member DeclaredInterfaces : IList + member DeclaredInterfaces: IList /// Get all the interface implementations, by walking the type hierarchy - member AllInterfaces : IList + member AllInterfaces: IList /// Check if the entity inherits from System.Attribute in its type hierarchy - member IsAttributeType : bool + member IsAttributeType: bool /// Get the base type, if any - member BaseType : FSharpType option + member BaseType: FSharpType option /// Get the properties, events and methods of a type definitions, or the functions and values of a module - member MembersFunctionsAndValues : IList + member MembersFunctionsAndValues: IList [] - member MembersOrValues : IList + member MembersOrValues: IList /// Get the modules and types defined in a module, or the nested types of a type - member NestedEntities : IList + member NestedEntities: IList /// Get the fields of a record, class, struct or enum from the perspective of the F# language. /// This includes static fields, the 'val' bindings in classes and structs, and the value definitions in enums. /// For classes, the list may include compiler generated fields implied by the use of primary constructors. - member FSharpFields : IList + member FSharpFields: IList [] - member RecordFields : IList + member RecordFields: IList /// Get the type abbreviated by an F# type abbreviation - member AbbreviatedType : FSharpType + member AbbreviatedType: FSharpType /// Get the cases of a union type - member UnionCases : IList + member UnionCases: IList /// Indicates if the type is a delegate with the given Invoke signature - member FSharpDelegateSignature : FSharpDelegateSignature + member FSharpDelegateSignature: FSharpDelegateSignature /// Get the declared accessibility of the type member Accessibility: FSharpAccessibility @@ -322,72 +327,76 @@ and [] public FSharpEntity = member RepresentationAccessibility: FSharpAccessibility /// Get all compilation paths, taking `Module` suffixes into account. - member AllCompilationPaths : string list + member AllCompilationPaths: string list /// Get all active pattern cases defined in all active patterns in the module. - member ActivePatternCases : FSharpActivePatternCase list + member ActivePatternCases: FSharpActivePatternCase list /// Represents a delegate signature in an F# symbol -and [] public FSharpDelegateSignature = +[] +type FSharpDelegateSignature = /// Get the argument types of the delegate signature - member DelegateArguments : IList + member DelegateArguments: IList /// Get the return type of the delegate signature - member DelegateReturnType : FSharpType + member DelegateReturnType: FSharpType /// Represents a parameter in an abstract method of a class or interface -and [] public FSharpAbstractParameter = +[] +type FSharpAbstractParameter = /// The optional name of the parameter - member Name : string option + member Name: string option /// The declared or inferred type of the parameter - member Type : FSharpType + member Type: FSharpType /// Indicate this is an in argument - member IsInArg : bool + member IsInArg: bool /// Indicate this is an out argument - member IsOutArg : bool + member IsOutArg: bool /// Indicate this is an optional argument - member IsOptionalArg : bool + member IsOptionalArg: bool /// The declared attributes of the parameter - member Attributes : IList + member Attributes: IList /// Represents the signature of an abstract slot of a class or interface -and [] public FSharpAbstractSignature = - internal new : SymbolEnv * SlotSig -> FSharpAbstractSignature +[] +type FSharpAbstractSignature = + internal new: SymbolEnv * SlotSig -> FSharpAbstractSignature /// Get the arguments of the abstract slot - member AbstractArguments : IList> + member AbstractArguments: IList> /// Get the return type of the abstract slot - member AbstractReturnType : FSharpType + member AbstractReturnType: FSharpType /// Get the generic arguments of the type defining the abstract slot - member DeclaringTypeGenericParameters : IList + member DeclaringTypeGenericParameters: IList /// Get the generic arguments of the abstract slot - member MethodGenericParameters : IList + member MethodGenericParameters: IList /// Get the name of the abstract slot - member Name : string + member Name: string /// Get the declaring type of the abstract slot - member DeclaringType : FSharpType + member DeclaringType: FSharpType /// A subtype of FSharpSymbol that represents a union case as seen by the F# language -and [] public FSharpUnionCase = +[] +type FSharpUnionCase = inherit FSharpSymbol - internal new : SymbolEnv * UnionCaseRef -> FSharpUnionCase + internal new: SymbolEnv * UnionCaseRef -> FSharpUnionCase /// Get the name of the union case member Name: string /// Get the range of the name of the case - member DeclarationLocation : range + member DeclarationLocation: range /// Indicates if the union case has field definitions member HasFields: bool @@ -418,29 +427,31 @@ and [] public FSharpUnionCase = member Attributes: IList /// Indicates if the union case is for a type in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language -and [] public FSharpAnonRecordTypeDetails = +[] +type FSharpAnonRecordTypeDetails = /// The assembly where the compiled form of the anonymous type is defined - member Assembly : FSharpAssembly + member Assembly: FSharpAssembly /// Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) - member EnclosingCompiledTypeNames : string list + member EnclosingCompiledTypeNames: string list /// The name of the compiled form of the anonymous type - member CompiledName : string + member CompiledName: string /// The sorted labels of the anonymous type - member SortedFieldNames : string[] + member SortedFieldNames: string[] /// A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language -and [] public FSharpField = +[] +type FSharpField = inherit FSharpSymbol - internal new : SymbolEnv * RecdFieldRef -> FSharpField - internal new : SymbolEnv * UnionCaseRef * int -> FSharpField + internal new: SymbolEnv * RecdFieldRef -> FSharpField + internal new: SymbolEnv * UnionCaseRef * int -> FSharpField /// Get the declaring entity of this field, if any. Fields from anonymous types do not have a declaring entity member DeclaringEntity: FSharpEntity option @@ -502,7 +513,7 @@ and [] public FSharpField = member FieldAttributes: IList /// Get the name of the field - member Name : string + member Name: string /// Get the default initialization info, for static literals member LiteralValue: obj option @@ -511,40 +522,42 @@ and [] public FSharpField = member Accessibility: FSharpAccessibility /// Indicates if the record field is for a type in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// Represents the rights of a compilation to access symbols -and [] public FSharpAccessibilityRights = - internal new : CcuThunk * AccessorDomain -> FSharpAccessibilityRights - member internal Contents : AccessorDomain +[] +type FSharpAccessibilityRights = + internal new: CcuThunk * AccessorDomain -> FSharpAccessibilityRights + member internal Contents: AccessorDomain /// A subtype of FSharpSymbol that represents a generic parameter for an FSharpSymbol -and [] public FSharpGenericParameter = +[] +type FSharpGenericParameter = inherit FSharpSymbol - internal new : SymbolEnv * Typar -> FSharpGenericParameter + internal new: SymbolEnv * Typar -> FSharpGenericParameter /// Get the name of the generic parameter member Name: string /// Get the range of the generic parameter - member DeclarationLocation : range + member DeclarationLocation: range /// Indicates if this is a measure variable - member IsMeasure : bool + member IsMeasure: bool /// Get the in-memory XML documentation for the type parameter, used when code is checked in-memory - member XmlDoc : IList + member XmlDoc: IList /// Get the elaborated XML documentation for the type parameter, used when code is checked in-memory, /// after any checking and processing to XML performed by the F# compiler member ElaboratedXmlDoc: IList /// Indicates if this is a statically resolved type variable - member IsSolveAtCompileTime : bool + member IsSolveAtCompileTime: bool /// Indicates if this is a compiler generated type parameter - member IsCompilerGenerated : bool + member IsCompilerGenerated: bool /// Get the declared attributes of the type parameter. member Attributes: IList @@ -555,7 +568,8 @@ and [] public FSharpGenericParameter = #if !NO_EXTENSIONTYPING /// A subtype of FSharpSymbol that represents a static parameter to an F# type provider -and [] public FSharpStaticParameter = +[] +type FSharpStaticParameter = inherit FSharpSymbol @@ -563,119 +577,126 @@ and [] public FSharpStaticParameter = member Name: string /// Get the declaration location of the static parameter - member DeclarationLocation : range + member DeclarationLocation: range /// Get the kind of the static parameter - member Kind : FSharpType + member Kind: FSharpType /// Get the default value for the static parameter - member DefaultValue : obj + member DefaultValue: obj /// Indicates if the static parameter is optional - member IsOptional : bool + member IsOptional: bool [] - member HasDefaultValue : bool + member HasDefaultValue: bool #endif + /// Get the range of the construct + member Range: range + /// Represents further information about a member constraint on a generic type parameter -and [] public FSharpGenericParameterMemberConstraint = +[] +type FSharpGenericParameterMemberConstraint = /// Get the types that may be used to satisfy the constraint - member MemberSources : IList + member MemberSources: IList /// Get the name of the method required by the constraint - member MemberName : string + member MemberName: string /// Indicates if the the method required by the constraint must be static - member MemberIsStatic : bool + member MemberIsStatic: bool /// Get the argument types of the method required by the constraint - member MemberArgumentTypes : IList + member MemberArgumentTypes: IList /// Get the return type of the method required by the constraint - member MemberReturnType : FSharpType + member MemberReturnType: FSharpType /// Represents further information about a delegate constraint on a generic type parameter -and [] public FSharpGenericParameterDelegateConstraint = +[] +type FSharpGenericParameterDelegateConstraint = /// Get the tupled argument type required by the constraint - member DelegateTupledArgumentType : FSharpType + member DelegateTupledArgumentType: FSharpType /// Get the return type required by the constraint - member DelegateReturnType : FSharpType + member DelegateReturnType: FSharpType /// Represents further information about a 'defaults to' constraint on a generic type parameter -and [] public FSharpGenericParameterDefaultsToConstraint = +[] +type FSharpGenericParameterDefaultsToConstraint = /// Get the priority off the 'defaults to' constraint - member DefaultsToPriority : int + member DefaultsToPriority: int /// Get the default type associated with the 'defaults to' constraint - member DefaultsToTarget : FSharpType + member DefaultsToTarget: FSharpType /// Represents a constraint on a generic type parameter -and [] public FSharpGenericParameterConstraint = +[] +type FSharpGenericParameterConstraint = /// Indicates a constraint that a type is a subtype of the given type - member IsCoercesToConstraint : bool + member IsCoercesToConstraint: bool /// Gets further information about a coerces-to constraint - member CoercesToTarget : FSharpType + member CoercesToTarget: FSharpType /// Indicates a default value for an inference type variable should it be neither generalized nor solved - member IsDefaultsToConstraint : bool + member IsDefaultsToConstraint: bool /// Gets further information about a defaults-to constraint - member DefaultsToConstraintData : FSharpGenericParameterDefaultsToConstraint + member DefaultsToConstraintData: FSharpGenericParameterDefaultsToConstraint /// Indicates a constraint that a type has a 'null' value - member IsSupportsNullConstraint : bool + member IsSupportsNullConstraint: bool /// Indicates a constraint that a type supports F# generic comparison - member IsComparisonConstraint : bool + member IsComparisonConstraint: bool /// Indicates a constraint that a type supports F# generic equality - member IsEqualityConstraint : bool + member IsEqualityConstraint: bool /// Indicates a constraint that a type is an unmanaged type - member IsUnmanagedConstraint : bool + member IsUnmanagedConstraint: bool /// Indicates a constraint that a type has a member with the given signature - member IsMemberConstraint : bool + member IsMemberConstraint: bool /// Gets further information about a member constraint - member MemberConstraintData : FSharpGenericParameterMemberConstraint + member MemberConstraintData: FSharpGenericParameterMemberConstraint /// Indicates a constraint that a type is a non-Nullable value type - member IsNonNullableValueTypeConstraint : bool + member IsNonNullableValueTypeConstraint: bool /// Indicates a constraint that a type is a reference type - member IsReferenceTypeConstraint : bool + member IsReferenceTypeConstraint: bool /// Indicates a constraint that is a type is a simple choice between one of the given ground types. Used by printf format strings. - member IsSimpleChoiceConstraint : bool + member IsSimpleChoiceConstraint: bool /// Gets further information about a choice constraint - member SimpleChoices : IList + member SimpleChoices: IList /// Indicates a constraint that a type has a parameterless constructor - member IsRequiresDefaultConstructorConstraint : bool + member IsRequiresDefaultConstructorConstraint: bool /// Indicates a constraint that a type is an enum with the given underlying - member IsEnumConstraint : bool + member IsEnumConstraint: bool /// Gets further information about an enumeration constraint - member EnumConstraintTarget : FSharpType + member EnumConstraintTarget: FSharpType /// Indicates a constraint that a type is a delegate from the given tuple of args to the given return type - member IsDelegateConstraint : bool + member IsDelegateConstraint: bool /// Gets further information about a delegate constraint - member DelegateConstraintData : FSharpGenericParameterDelegateConstraint - + member DelegateConstraintData: FSharpGenericParameterDelegateConstraint -and [] public FSharpInlineAnnotation = +[] +type FSharpInlineAnnotation = /// Indicates the value is inlined and compiled code for the function does not exist | PseudoValue @@ -693,17 +714,18 @@ and [] public FSharpInlineAnnotation = | AggressiveInline /// A subtype of F# symbol that represents an F# method, property, event, function or value, including extension members. -and [] public FSharpMemberOrFunctionOrValue = +[] +type FSharpMemberOrFunctionOrValue = inherit FSharpSymbol - internal new : SymbolEnv * ValRef -> FSharpMemberOrFunctionOrValue - internal new : SymbolEnv * Infos.MethInfo -> FSharpMemberOrFunctionOrValue + internal new: SymbolEnv * ValRef -> FSharpMemberOrFunctionOrValue + internal new: SymbolEnv * Infos.MethInfo -> FSharpMemberOrFunctionOrValue /// Indicates if the member, function or value is in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// Get the enclosing entity for the definition - member DeclaringEntity : FSharpEntity option + member DeclaringEntity: FSharpEntity option /// Get the logical enclosing entity, which for an extension member is type being extended member ApparentEnclosingEntity: FSharpEntity @@ -718,58 +740,58 @@ and [] public FSharpMemberOrFunctionOrValue = member FullType: FSharpType /// Indicates if this is a compiler generated value - member IsCompilerGenerated : bool + member IsCompilerGenerated: bool /// Get a result indicating if this is a must-inline value - member InlineAnnotation : FSharpInlineAnnotation + member InlineAnnotation: FSharpInlineAnnotation /// Indicates if this is a mutable value - member IsMutable : bool + member IsMutable: bool /// Indicates if this is a module or member value - member IsModuleValueOrMember : bool + member IsModuleValueOrMember: bool /// Indicates if this is an extension member? - member IsExtensionMember : bool + member IsExtensionMember: bool [] - member IsOverrideOrExplicitMember : bool + member IsOverrideOrExplicitMember: bool /// Indicates if this is an 'override', 'default' or an explicit implementation of an interface member - member IsOverrideOrExplicitInterfaceImplementation : bool + member IsOverrideOrExplicitInterfaceImplementation: bool /// Indicates if this is an explicit implementation of an interface member - member IsExplicitInterfaceImplementation : bool + member IsExplicitInterfaceImplementation: bool /// Gets the list of the abstract slot signatures implemented by the member - member ImplementedAbstractSignatures : IList + member ImplementedAbstractSignatures: IList /// Indicates if this is a member, including extension members? - member IsMember : bool + member IsMember: bool /// Indicates if this is a property member - member IsProperty : bool + member IsProperty: bool /// Indicates if this is a property and there exists an associated getter method - member HasGetterMethod : bool + member HasGetterMethod: bool /// Get an associated getter method of the property - member GetterMethod : FSharpMemberOrFunctionOrValue + member GetterMethod: FSharpMemberOrFunctionOrValue /// Indicates if this is a property and there exists an associated setter method - member HasSetterMethod : bool + member HasSetterMethod: bool /// Get an associated setter method of the property - member SetterMethod : FSharpMemberOrFunctionOrValue + member SetterMethod: FSharpMemberOrFunctionOrValue /// Get an associated add method of an event - member EventAddMethod : FSharpMemberOrFunctionOrValue + member EventAddMethod: FSharpMemberOrFunctionOrValue /// Get an associated remove method of an event - member EventRemoveMethod : FSharpMemberOrFunctionOrValue + member EventRemoveMethod: FSharpMemberOrFunctionOrValue /// Get an associated delegate type of an event - member EventDelegateType : FSharpType + member EventDelegateType: FSharpType /// Indicate if an event can be considered to be a property for the F# type system of type IEvent or IDelegateEvent. /// In this case ReturnParameter will have a type corresponding to the property type. For @@ -777,17 +799,17 @@ and [] public FSharpMemberOrFunctionOrValue = member EventIsStandard: bool /// Indicates if this is an event member - member IsEvent : bool + member IsEvent: bool /// Gets the event symbol implied by the use of a property, /// for the case where the property is actually an F#-declared CLIEvent. /// /// Uses of F#-declared events are considered to be properties as far as the language specification /// and this API are concerned. - member EventForFSharpProperty : FSharpMemberOrFunctionOrValue option + member EventForFSharpProperty: FSharpMemberOrFunctionOrValue option /// Indicates if this is an abstract member? - member IsDispatchSlot : bool + member IsDispatchSlot: bool /// Indicates if this is a getter method for a property, or a use of a property in getter mode [] @@ -810,22 +832,22 @@ and [] public FSharpMemberOrFunctionOrValue = member IsEventRemoveMethod: bool /// Indicates if this is an instance member, when seen from F#? - member IsInstanceMember : bool + member IsInstanceMember: bool /// Indicates if this is an instance member in compiled code. /// /// Explanatory note: some members such as IsNone and IsSome on types with UseNullAsTrueValue appear /// as instance members in F# code but are compiled as static members. - member IsInstanceMemberInCompiledCode : bool + member IsInstanceMemberInCompiledCode: bool /// Indicates if this is an implicit constructor? - member IsImplicitConstructor : bool + member IsImplicitConstructor: bool /// Indicates if this is an F# type function - member IsTypeFunction : bool + member IsTypeFunction: bool /// Indicates if this value or member is an F# active pattern - member IsActivePattern : bool + member IsActivePattern: bool /// Get the member name in compiled code member CompiledName: string @@ -834,15 +856,15 @@ and [] public FSharpMemberOrFunctionOrValue = member LogicalName: string /// Get the name as presented in F# error messages and documentation - member DisplayName : string + member DisplayName: string - member CurriedParameterGroups : IList> + member CurriedParameterGroups: IList> /// Gets the overloads for the current method /// matchParameterNumber indicates whether to filter the overloads to match the number of parameters in the current symbol - member Overloads : bool -> IList option + member Overloads: bool -> IList option - member ReturnParameter : FSharpParameter + member ReturnParameter: FSharpParameter /// Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup /// these value references after copying a collection of values. @@ -859,35 +881,39 @@ and [] public FSharpMemberOrFunctionOrValue = member XmlDocSig: string /// Indicates if this is "base" in "base.M(...)" - member IsBaseValue : bool + member IsBaseValue: bool /// Indicates if this is the "x" in "type C() as x = ..." - member IsConstructorThisValue : bool + member IsConstructorThisValue: bool /// Indicates if this is the "x" in "member x.M = ..." - member IsMemberThisValue : bool + member IsMemberThisValue: bool /// Indicates if this is a [] value, and if so what value? (may be null) - member LiteralValue : obj option + member LiteralValue: obj option /// Get the accessibility information for the member, function or value - member Accessibility : FSharpAccessibility + member Accessibility: FSharpAccessibility /// Indicated if this is a value compiled to a method - member IsValCompiledAsMethod : bool + member IsValCompiledAsMethod: bool /// Indicated if this is a value - member IsValue : bool + member IsValue: bool /// Indicates if this is a constructor. - member IsConstructor : bool + member IsConstructor: bool /// Format the type using the rules of the given display context - member FormatLayout : context: FSharpDisplayContext -> Layout + member FormatLayout: context: FSharpDisplayContext -> Layout + /// Check if this method has an entrpoint that accepts witness arguments and if so return + /// the name of that entrypoint and information about the additional witness arguments + member GetWitnessPassingInfo: unit -> (string * IList) option /// A subtype of FSharpSymbol that represents a parameter -and [] public FSharpParameter = +[] +type FSharpParameter = inherit FSharpSymbol @@ -895,10 +921,10 @@ and [] public FSharpParameter = member Name: string option /// The declaration location of the parameter - member DeclarationLocation : range + member DeclarationLocation: range /// The declared or inferred type of the parameter - member Type : FSharpType + member Type: FSharpType /// The declared attributes of the parameter member Attributes: IList @@ -917,7 +943,8 @@ and [] public FSharpParameter = /// A subtype of FSharpSymbol that represents a single case within an active pattern -and [] public FSharpActivePatternCase = +[] +type FSharpActivePatternCase = inherit FSharpSymbol @@ -928,10 +955,10 @@ and [] public FSharpActivePatternCase = member Index: int /// The location of declaration of the active pattern case - member DeclarationLocation : range + member DeclarationLocation: range /// The group of active pattern cases this belongs to - member Group : FSharpActivePatternGroup + member Group: FSharpActivePatternGroup /// Get the in-memory XML documentation for the active pattern case, used when code is checked in-memory member XmlDoc: IList @@ -944,7 +971,8 @@ and [] public FSharpActivePatternCase = member XmlDocSig: string /// Represents all cases within an active pattern -and [] public FSharpActivePatternGroup = +[] +type FSharpActivePatternGroup = /// The whole group name member Name: string option @@ -953,46 +981,47 @@ and [] public FSharpActivePatternGroup = member Names: IList /// Indicate this is a total active pattern - member IsTotal : bool + member IsTotal: bool /// Get the type indicating signature of the active pattern - member OverallType : FSharpType + member OverallType: FSharpType /// Try to get the entity in which the active pattern is declared - member DeclaringEntity : FSharpEntity option + member DeclaringEntity: FSharpEntity option -and [] public FSharpType = +[] +type FSharpType = /// Internal use only. Create a ground type. - internal new : g:TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * ty:TType -> FSharpType - internal new : SymbolEnv * ty:TType -> FSharpType + internal new: g:TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * ty:TType -> FSharpType + internal new: SymbolEnv * ty:TType -> FSharpType /// Indicates this is a named type in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// Indicates this is an abbreviation for another type - member IsAbbreviation : bool + member IsAbbreviation: bool /// Get the type for which this is an abbreviation - member AbbreviatedType : FSharpType + member AbbreviatedType: FSharpType /// Indicates if the type is constructed using a named entity, including array and byref types - member HasTypeDefinition : bool + member HasTypeDefinition: bool /// Get the type definition for a type - member TypeDefinition : FSharpEntity + member TypeDefinition: FSharpEntity /// Get the generic arguments for a tuple type, a function type or a type constructed using a named entity - member GenericArguments : IList + member GenericArguments: IList /// Indicates if the type is a tuple type (reference or struct). The GenericArguments property returns the elements of the tuple type. - member IsTupleType : bool + member IsTupleType: bool /// Indicates if the type is a struct tuple type. The GenericArguments property returns the elements of the tuple type. - member IsStructTupleType : bool + member IsStructTupleType: bool /// Indicates if the type is a function type. The GenericArguments property returns the domain and range of the function type. - member IsFunctionType : bool + member IsFunctionType: bool /// Indicates if the type is an anonymous record type. The GenericArguments property returns the type instantiation of the anonymous record type member IsAnonRecordType: bool @@ -1001,82 +1030,86 @@ and [] public FSharpType = member AnonRecordTypeDetails: FSharpAnonRecordTypeDetails /// Indicates if the type is a variable type, whether declared, generalized or an inference type parameter - member IsGenericParameter : bool + member IsGenericParameter: bool /// Get the generic parameter data for a generic parameter type - member GenericParameter : FSharpGenericParameter + member GenericParameter: FSharpGenericParameter /// Format the type using the rules of the given display context - member Format : context: FSharpDisplayContext -> string + member Format: context: FSharpDisplayContext -> string /// Format the type using the rules of the given display context - member FormatLayout : context: FSharpDisplayContext -> Layout + member FormatLayout: context: FSharpDisplayContext -> Layout /// Instantiate generic type parameters in a type - member Instantiate : (FSharpGenericParameter * FSharpType) list -> FSharpType + member Instantiate: (FSharpGenericParameter * FSharpType) list -> FSharpType /// Get all the interface implementations, by walking the type hierarchy, taking into account the instantiation of this type /// if it is an instantiation of a generic type. - member AllInterfaces : IList + member AllInterfaces: IList /// Get the base type, if any, taking into account the instantiation of this type /// if it is an instantiation of a generic type. - member BaseType : FSharpType option + member BaseType: FSharpType option /// Adjust the type by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : ty:FSharpType -> FSharpType + static member Prettify: ty:FSharpType -> FSharpType /// Adjust a group of types by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : types: IList -> IList + static member Prettify: types: IList -> IList /// Adjust the type in a single parameter by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : parameter: FSharpParameter -> FSharpParameter + static member Prettify: parameter: FSharpParameter -> FSharpParameter /// Adjust the types in a group of parameters by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : parameters: IList -> IList + static member Prettify: parameters: IList -> IList /// Adjust the types in a group of curried parameters by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : parameters: IList> -> IList> + static member Prettify: parameters: IList> -> IList> /// Adjust the types in a group of curried parameters and return type by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : parameters: IList> * returnParameter: FSharpParameter -> IList> * FSharpParameter + static member Prettify: parameters: IList> * returnParameter: FSharpParameter -> IList> * FSharpParameter [] - member IsNamedType : bool + member IsNamedType: bool [] - member NamedEntity : FSharpEntity + member NamedEntity: FSharpEntity /// Represents a custom attribute attached to F# source code or a compiler .NET component -and [] public FSharpAttribute = +[] +type FSharpAttribute = /// The type of the attribute - member AttributeType : FSharpEntity + member AttributeType: FSharpEntity /// The arguments to the constructor for the attribute - member ConstructorArguments : IList + member ConstructorArguments: IList /// The named arguments for the attribute - member NamedArguments : IList + member NamedArguments: IList /// Indicates if the attribute type is in an unresolved assembly - member IsUnresolved : bool + member IsUnresolved: bool /// Format the attribute using the rules of the given display context - member Format : context: FSharpDisplayContext -> string + member Format: context: FSharpDisplayContext -> string + + /// Get the range of the name of the attribute + member Range: range /// Represents open declaration in F# code. [] -type public FSharpOpenDeclaration = +type FSharpOpenDeclaration = - internal new : target: SynOpenDeclTarget * range: range option * modules: FSharpEntity list * types: FSharpType list * appliedScope: range * isOwnNamespace: bool -> FSharpOpenDeclaration + internal new: target: SynOpenDeclTarget * range: range option * modules: FSharpEntity list * types: FSharpType list * appliedScope: range * isOwnNamespace: bool -> FSharpOpenDeclaration /// The syntactic target of the declaration member LongId: Ident list @@ -1101,38 +1134,38 @@ type public FSharpOpenDeclaration = /// Represents the use of an F# symbol from F# source code [] -type public FSharpSymbolUse = +type FSharpSymbolUse = // For internal use only - internal new : g:TcGlobals * denv: DisplayEnv * symbol:FSharpSymbol * itemOcc:ItemOccurence * range: range -> FSharpSymbolUse + internal new: g:TcGlobals * denv: DisplayEnv * symbol:FSharpSymbol * itemOcc:ItemOccurence * range: range -> FSharpSymbolUse /// The symbol referenced - member Symbol : FSharpSymbol + member Symbol: FSharpSymbol /// The display context active at the point where the symbol is used. Can be passed to FSharpType.Format /// and other methods to format items in a way that is suitable for a specific source code location. - member DisplayContext : FSharpDisplayContext + member DisplayContext: FSharpDisplayContext /// Indicates if the reference is a definition for the symbol, either in a signature or implementation - member IsFromDefinition : bool + member IsFromDefinition: bool /// Indicates if the reference is in a pattern - member IsFromPattern : bool + member IsFromPattern: bool /// Indicates if the reference is in a syntactic type - member IsFromType : bool + member IsFromType: bool /// Indicates if the reference is in an attribute - member IsFromAttribute : bool + member IsFromAttribute: bool /// Indicates if the reference is via the member being implemented in a class or object expression - member IsFromDispatchSlotImplementation : bool + member IsFromDispatchSlotImplementation: bool /// Indicates if the reference is either a builder or a custom operation in a computation expression - member IsFromComputationExpression : bool + member IsFromComputationExpression: bool /// Indicates if the reference is in open statement - member IsFromOpenStatement : bool + member IsFromOpenStatement: bool /// The file name the reference occurs in member FileName: string diff --git a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs index dd6b41b43f2..5bebc9201d0 100644 --- a/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs +++ b/tests/FSharp.Compiler.Service.Tests/SurfaceArea.netstandard.fs @@ -20618,6 +20618,8 @@ FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOp FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.SourceCodeServices.FSharpExpr,FSharp.Compiler.SourceCodeServices.FSharpType,FSharp.Compiler.SourceCodeServices.FSharpUnionCase,FSharp.Compiler.SourceCodeServices.FSharpField,FSharp.Compiler.SourceCodeServices.FSharpExpr]] |UnionCaseSet|_|(FSharp.Compiler.SourceCodeServices.FSharpExpr) FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.SourceCodeServices.FSharpExpr],FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpExpr]]] |Call|_|(FSharp.Compiler.SourceCodeServices.FSharpExpr) FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`6[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],System.String,FSharp.Compiler.SyntaxTree+MemberFlags,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpExpr]]] |TraitCall|_|(FSharp.Compiler.SourceCodeServices.FSharpExpr) +FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] |WitnessArg|_|(FSharp.Compiler.SourceCodeServices.FSharpExpr) +FSharp.Compiler.SourceCodeServices.BasicPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`6[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.SourceCodeServices.FSharpExpr],FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SourceCodeServices.FSharpExpr]]] |CallWithWitnesses|_|(FSharp.Compiler.SourceCodeServices.FSharpExpr) FSharp.Compiler.SourceCodeServices.CompilerEnvironment: Microsoft.FSharp.Core.FSharpOption`1[System.String] BinFolderOfDefaultFSharpCompiler(Microsoft.FSharp.Core.FSharpOption`1[System.String]) FSharp.Compiler.SourceCodeServices.CompilerEnvironmentModule: Boolean IsCheckerSupportedSubcategory(System.String) FSharp.Compiler.SourceCodeServices.CompilerEnvironmentModule: Microsoft.FSharp.Collections.FSharpList`1[System.String] DefaultReferencesForOrphanSources(Boolean) @@ -21400,6 +21402,8 @@ FSharp.Compiler.SourceCodeServices.FSharpAttribute: System.Collections.Generic.I FSharp.Compiler.SourceCodeServices.FSharpAttribute: System.Collections.Generic.IList`1[System.Tuple`4[FSharp.Compiler.SourceCodeServices.FSharpType,System.String,System.Boolean,System.Object]] get_NamedArguments() FSharp.Compiler.SourceCodeServices.FSharpAttribute: System.String Format(FSharp.Compiler.SourceCodeServices.FSharpDisplayContext) FSharp.Compiler.SourceCodeServices.FSharpAttribute: System.String ToString() +FSharp.Compiler.SourceCodeServices.FSharpAttribute: range Range +FSharp.Compiler.SourceCodeServices.FSharpAttribute: range get_Range() FSharp.Compiler.SourceCodeServices.FSharpCheckFileAnswer+Succeeded: Boolean Equals(FSharp.Compiler.SourceCodeServices.FSharpCheckFileAnswer) FSharp.Compiler.SourceCodeServices.FSharpCheckFileAnswer+Succeeded: Boolean Equals(System.Object) FSharp.Compiler.SourceCodeServices.FSharpCheckFileAnswer+Succeeded: Boolean Equals(System.Object, System.Collections.IEqualityComparer) @@ -21767,6 +21771,8 @@ FSharp.Compiler.SourceCodeServices.FSharpEntity: System.String get_QualifiedName FSharp.Compiler.SourceCodeServices.FSharpEntity: System.String get_XmlDocSig() FSharp.Compiler.SourceCodeServices.FSharpEntity: range DeclarationLocation FSharp.Compiler.SourceCodeServices.FSharpEntity: range get_DeclarationLocation() +FSharp.Compiler.SourceCodeServices.FSharpEntity: Boolean IsAbstractClass +FSharp.Compiler.SourceCodeServices.FSharpEntity: Boolean get_IsAbstractClass() FSharp.Compiler.SourceCodeServices.FSharpErrorInfo: FSharp.Compiler.SourceCodeServices.FSharpErrorSeverity Severity FSharp.Compiler.SourceCodeServices.FSharpErrorInfo: FSharp.Compiler.SourceCodeServices.FSharpErrorSeverity get_Severity() FSharp.Compiler.SourceCodeServices.FSharpErrorInfo: Int32 EndColumn @@ -22532,6 +22538,7 @@ FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue: System.String FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue: System.String get_XmlDocSig() FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue: range DeclarationLocation FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue: range get_DeclarationLocation() +FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.String,System.Collections.Generic.IList`1[FSharp.Compiler.SourceCodeServices.FSharpParameter]]] GetWitnessPassingInfo() FSharp.Compiler.SourceCodeServices.FSharpMethodGroup: FSharp.Compiler.SourceCodeServices.FSharpMethodGroupItem[] Methods FSharp.Compiler.SourceCodeServices.FSharpMethodGroup: FSharp.Compiler.SourceCodeServices.FSharpMethodGroupItem[] get_Methods() FSharp.Compiler.SourceCodeServices.FSharpMethodGroup: System.String MethodName @@ -22831,6 +22838,8 @@ FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: System.String get_Full FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: System.String get_Name() FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: range DeclarationLocation FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: range get_DeclarationLocation() +FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: range Range +FSharp.Compiler.SourceCodeServices.FSharpStaticParameter: range get_Range() FSharp.Compiler.SourceCodeServices.FSharpSymbol: Boolean Equals(System.Object) FSharp.Compiler.SourceCodeServices.FSharpSymbol: Boolean IsAccessible(FSharp.Compiler.SourceCodeServices.FSharpAccessibilityRights) FSharp.Compiler.SourceCodeServices.FSharpSymbol: Boolean IsEffectivelySameAs(FSharp.Compiler.SourceCodeServices.FSharpSymbol) diff --git a/tests/fsharp/core/quotes/test.fsx b/tests/fsharp/core/quotes/test.fsx index 70c3fa11102..bb4223edd12 100644 --- a/tests/fsharp/core/quotes/test.fsx +++ b/tests/fsharp/core/quotes/test.fsx @@ -3864,6 +3864,54 @@ module TestInlineQuotationOfAbsOperator = | _ -> false) +module TestQuotationOfListSum = + type Point = + { x: int; y: int } + static member Zero = { x=0; y=0 } + static member (+) (p1, p2) = { x= p1.x + p2.x; y = p1.y + p2.y } + let points = [{x=1; y=10}] + + let q = <@ List.sum points @> + + match q with + | CallWithWitnesses(None, minfo1, minfo2, [w1; w2], [_]) -> + test "check List.sum 111" (minfo1.Name = "Sum") + test "check List.sum 112" (minfo2.Name = "Sum$W") + printfn "w1 = %A" w1 + match w1 with + | Lambda(v, PropertyGet(None, miFoo, [])) -> + test "check List.sum 113" (miFoo.Name = "Zero") + | _ -> + test "check List.sum 114" false + match w2 with + | Lambda(v, Lambda(v2, Call(None, miFoo, [_;_]))) -> + test "check List.sum 115" (miFoo.Name = "op_Addition") + | _ -> + test "check List.sum 116" false + | _ -> + test "check List.sum 117" false + + +module TestQuotationOfListSum2 = + type Point = + { x: int; y: int } + static member Zero = { x=0; y=0 } + static member (+) (p1, p2) = { x= p1.x + p2.x; y = p1.y + p2.y } + let points = [{x=1; y=10}] + + let inline quoteListSum points = <@ List.sum points @> + + match quoteListSum points with + | CallWithWitnesses(None, minfo1, minfo2, [Value (f1, _); Value (f2, _)], [Value (v,_)]) -> + test "check List.sum 211" (minfo1.Name = "Sum") + test "check List.sum 212" (minfo2.Name = "Sum$W") + test "check List.sum 213" (((v :?> Point list) = points)) + test "check List.sum 214" ((((f1 :?> (unit -> Point)) ()) = Point.Zero)) + test "check List.sum 215" ((((f2 :?> (Point -> Point -> Point)) {x=1;y=1} {x=1;y=2}) = {x=2;y=3})) + | _ -> + test "check List.sum 216" false + + #endif diff --git a/tests/service/Common.fs b/tests/service/Common.fs index e1b8c81f5b9..418950f403b 100644 --- a/tests/service/Common.fs +++ b/tests/service/Common.fs @@ -109,6 +109,7 @@ let mkProjectCommandLineArgsSilent (dllName, fileNames) = yield "--define:DEBUG" #if NETCOREAPP yield "--targetprofile:netcore" + yield "--langversion:preview" #endif yield "--optimize-" yield "--out:" + dllName diff --git a/tests/service/ExprTests.fs b/tests/service/ExprTests.fs index 0838d447c8e..05164371137 100644 --- a/tests/service/ExprTests.fs +++ b/tests/service/ExprTests.fs @@ -1,14 +1,13 @@  #if INTERACTIVE -#r "../../artifacts/bin/fcs/net461/FSharp.Compiler.Service.dll" // note, build FSharp.Compiler.Service.Tests.fsproj to generate this, this DLL has a public API so can be used from F# Interactive -#r "../../artifacts/bin/fcs/net461/nunit.framework.dll" +#r "../../artifacts/bin/FSharp.Compiler.Service/Debug/netstandard2.0/FSharp.Compiler.Service.dll" +#r "../../artifacts/bin/FSharp.Compiler.UnitTests/Debug/net472/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" #else module FSharp.Compiler.Service.Tests.ExprTests #endif - open NUnit.Framework open FsUnit open System @@ -20,18 +19,18 @@ open System.Threading open FSharp.Compiler.SourceCodeServices open FSharp.Compiler.Service.Tests.Common -let internal exprChecker = FSharpChecker.Create(keepAssemblyContents=true) - type FSharpCore = | FC45 | FC46 | FC47 + | FC50 static member fsharpVersion fc = match fc with | FC45 -> "FSharp.Core 4.5" | FC46 -> "FSharp.Core 4.6" | FC47 -> "FSharp.Core 4.7" + | FC50 -> "FSharp.Core 5.0" [] @@ -63,19 +62,20 @@ module internal Utils = /// Clean up after a test is run. If you need to inspect the create *.fs files, change this function to do nothing, or just break here. let cleanupTempFiles files = - for fileName in files do - try - // cleanup: only the source file is written to the temp dir. - File.Delete fileName - with _ -> () - - try - // remove the dir when empty - let tempPath = getTempPath() - if Directory.GetFiles tempPath |> Array.isEmpty then - Directory.Delete tempPath - with _ -> () - + { new System.IDisposable with + member _.Dispose() = + for fileName in files do + try + // cleanup: only the source file is written to the temp dir. + File.Delete fileName + with _ -> () + + try + // remove the dir when empty + let tempPath = getTempPath() + if Directory.GetFiles tempPath |> Array.isEmpty then + Directory.Delete tempPath + with _ -> () } /// Given just a filename, returns it with changed extension located in %TEMP%\ExprTests let getTempFilePathChangeExt tmp ext = @@ -99,6 +99,8 @@ module internal Utils = | BasicPatterns.AddressSet(e1,e2) -> printExpr 0 e1 + " <- " + printExpr 0 e2 | BasicPatterns.Application(f,tyargs,args) -> quote low (printExpr 10 f + printTyargs tyargs + " " + printCurriedArgs args) | BasicPatterns.BaseValue(_) -> "base" + | BasicPatterns.CallWithWitnesses(Some obj,v,tyargs1,tyargs2,witnessL,argsL) -> printObjOpt (Some obj) + v.CompiledName + printTyargs tyargs2 + printTupledArgs (witnessL @ argsL) + | BasicPatterns.CallWithWitnesses(None,v,tyargs1,tyargs2,witnessL,argsL) -> v.DeclaringEntity.Value.CompiledName + printTyargs tyargs1 + "." + v.CompiledName + printTyargs tyargs2 + " " + printTupledArgs (witnessL @ argsL) | BasicPatterns.Call(Some obj,v,tyargs1,tyargs2,argsL) -> printObjOpt (Some obj) + v.CompiledName + printTyargs tyargs2 + printTupledArgs argsL | BasicPatterns.Call(None,v,tyargs1,tyargs2,argsL) -> v.DeclaringEntity.Value.CompiledName + printTyargs tyargs1 + "." + v.CompiledName + printTyargs tyargs2 + " " + printTupledArgs argsL | BasicPatterns.Coerce(ty1,e1) -> quote low (printExpr 10 e1 + " :> " + printTy ty1) @@ -218,6 +220,7 @@ module internal Utils = yield text | FSharpImplementationFileDeclaration.InitAction(e) -> yield sprintf "do %s" (printExpr 0 e) } + and printDeclarations excludes ds = seq { for d in ds do yield! printDeclaration excludes d } @@ -346,6 +349,21 @@ module internal Utils = } +let createOptionsAux fileSources extraArgs = + let fileNames = fileSources |> List.map (fun _ -> Utils.getTempFileName()) + let temp2 = Utils.getTempFileName() + let fileNames = fileNames |> List.map (fun temp1 -> Utils.getTempFilePathChangeExt temp1 ".fs") + let dllName = Utils.getTempFilePathChangeExt temp2 ".dll" + let projFileName = Utils.getTempFilePathChangeExt temp2 ".fsproj" + + Utils.createTempDir() + for (fileSource, fileName) in List.zip fileSources fileNames do + File.WriteAllText(fileName, fileSource) + let args = [| yield! extraArgs; yield! mkProjectCommandLineArgs (dllName, fileNames) |] + let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + + Utils.cleanupTempFiles (fileNames @ [dllName; projFileName]), options + //--------------------------------------------------------------------------------------------------------- // This project is a smoke test for a whole range of standard and obscure expressions @@ -638,27 +656,7 @@ let testMutableVar = mutableVar 1 let testMutableConst = mutableConst () """ - let createOptions() = - let temp1 = Utils.getTempFileName() - let temp2 = Utils.getTempFileName() - let fileName1 = Utils.getTempFilePathChangeExt temp1 ".fs" // Path.ChangeExtension(Path.GetTempFileName(), ".fs") - let fileName2 = Utils.getTempFilePathChangeExt temp2 ".fs" //Path.ChangeExtension(base2, ".fs") - let dllName = Utils.getTempFilePathChangeExt temp2 ".dll" //Path.ChangeExtension(base2, ".dll") - let projFileName = Utils.getTempFilePathChangeExt temp2 ".fsproj" //Path.ChangeExtension(base2, ".fsproj") - - Utils.createTempDir() - File.WriteAllText(fileName1, fileSource1) - File.WriteAllText(fileName2, fileSource2) - let fileNames = [fileName1; fileName2] - let args = mkProjectCommandLineArgs (dllName, fileNames) - let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) - - [fileName1; fileName2; dllName; projFileName], options - - let options = lazy createOptions() - - - + let createOptions() = createOptionsAux [fileSource1; fileSource2] [] let operatorTests = """ module OperatorTests{0} @@ -720,8 +718,12 @@ let test{0}ToStringOperator (e1:{1}) = string e1 """ /// This test is run in unison with its optimized counterpart below +[] let ``Test Unoptimized Declarations Project1`` () = - let wholeProjectResults = exprChecker.ParseAndCheckProject(snd Project1.options.Value) |> Async.RunSynchronously + let cleanup, options = Project1.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously for e in wholeProjectResults.Errors do printfn "Project1 error: <<<%s>>>" e.Message @@ -735,110 +737,110 @@ let ``Test Unoptimized Declarations Project1`` () = let file1 = wholeProjectResults.AssemblyContents.ImplementationFiles.[0] let file2 = wholeProjectResults.AssemblyContents.ImplementationFiles.[1] - let expected = [ - "type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; - "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; - "let tupleEx1 = (1,1) @ (9,16--9,21)"; - "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; - "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; - "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; - "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; - "let funcEx1(x) = x @ (23,23--23,24)"; - "let genericFuncEx1(x) = x @ (24,29--24,30)"; - "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; - "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; - "let testILCall1 = new Object() @ (27,18--27,27)"; - "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; - "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; - "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; - "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; - "type ClassWithImplicitConstructor"; - "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; - "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; - "member M1(__) (unitVar1) = Operators.op_Addition (Operators.op_Addition (__.compiledAsField,let x: Microsoft.FSharp.Core.int = __.compiledAsField in __.compiledAsGenericInstanceMethod(x)),__.compiledAsArg) @ (55,21--55,102)"; - "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; - "member SM1(unitVar0) = Operators.op_Addition (compiledAsStaticField,let x: Microsoft.FSharp.Core.int = compiledAsStaticField in ClassWithImplicitConstructor.compiledAsGenericStaticMethod (x)) @ (57,26--57,101)"; - "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; - "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; - "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; - "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; - "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; - "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; - "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; - "let quotationTest1(unitVar0) = quote(Operators.op_Addition (1,1)) @ (83,24--83,35)"; - "let quotationTest2(v) = quote(Operators.op_Addition (ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; - "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; - "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; - "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; - "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; - "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; - "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; - "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; - "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; - "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; - "do Console.WriteLine (\"777\")"; - "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; - "type MultiArgMethods"; - "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; - "member Method(x) (a,b) = 1 @ (106,37--106,38)"; - "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; - "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (m.Method(7,8),fun tupledArg -> let arg00: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg01: Microsoft.FSharp.Core.int = tupledArg.Item1 in fun tupledArg -> let arg10: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg11: Microsoft.FSharp.Core.int = tupledArg.Item1 in m.CurriedMethod(arg00,arg01,arg10,arg11) (9,10) (11,12)) @ (110,8--110,9)"; - "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (x,y) @ (122,70--122,75)"; - "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress, false, ILArrayShape [(Some 0, null)], !0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; - "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; - "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = Operators.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = Operators.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; - "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (x,1) done; x) @ (152,15--152,16)"; - "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; - "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; - "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; - "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; - "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; - "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; - "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; - "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; - "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; - "let f(x) (y) = Operators.op_Addition (x,y) @ (207,12--207,15)"; - "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; - "let h = Operators.op_Addition (M.g () 2,3) @ (209,8--209,17)"; - "type TestFuncProp"; - "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; - "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; - "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; - "let start(name) = (name,name) @ (217,4--217,14)"; - "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; - "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; - "let test7(s) = Operators.op_PipeRight (M.start (s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (226,4--226,19)"; - "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; - "let test9(s) = Operators.op_PipeRight ((s,s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (232,4--232,17)"; - "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; - "let test11(s) = Operators.op_PipeRight (s,fun name -> M.last2 (name)) @ (238,4--238,14)"; - "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; - "type LetLambda"; - "let f = ((); fun a -> fun b -> Operators.op_Addition (a,b)) @ (246,8--247,24)"; - "let letLambdaRes = Operators.op_PipeRight<(Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list,Microsoft.FSharp.Core.int Microsoft.FSharp.Collections.list> (Cons((1,2),Empty()),let mapping: Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int -> Microsoft.FSharp.Core.int = fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b in fun list -> ListModule.Map (mapping,list)) @ (249,19--249,71)"; - "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)"; - "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)" - ] - - let expected2 = [ - "type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; - "let testHashChar(x) = Operators.Hash (x) @ (8,28--8,34)"; - "let testHashSByte(x) = Operators.Hash (x) @ (9,30--9,36)"; - "let testHashInt16(x) = Operators.Hash (x) @ (10,30--10,36)"; - "let testHashInt64(x) = Operators.Hash (x) @ (11,30--11,36)"; - "let testHashUInt64(x) = Operators.Hash (x) @ (12,32--12,38)"; - "let testHashIntPtr(x) = Operators.Hash (x) @ (13,35--13,41)"; - "let testHashUIntPtr(x) = Operators.Hash (x) @ (14,37--14,43)"; - "let testHashString(x) = Operators.Hash (x) @ (16,32--16,38)"; - "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; - "let mutableVar(x) = (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (20,4--22,16)"; - "let mutableConst(unitVar0) = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (25,16--25,19)"; - "let testMutableVar = N.mutableVar (1) @ (28,21--28,33)"; - "let testMutableConst = N.mutableConst (()) @ (29,23--29,38)"; - ] - + let expected = + ["type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; + "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; + "let tupleEx1 = (1,1) @ (9,16--9,21)"; + "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; + "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; + "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; + "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; + "let funcEx1(x) = x @ (23,23--23,24)"; + "let genericFuncEx1(x) = x @ (24,29--24,30)"; + "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; + "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; + "let testILCall1 = new Object() @ (27,18--27,27)"; + "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; + "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; + "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; + "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; + "type ClassWithImplicitConstructor"; + "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; + "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; + "member M1(__) (unitVar1) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),__.compiledAsField,let x: Microsoft.FSharp.Core.int = __.compiledAsField in __.compiledAsGenericInstanceMethod(x)),__.compiledAsArg) @ (55,21--55,102)"; + "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; + "member SM1(unitVar0) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsStaticField,let x: Microsoft.FSharp.Core.int = compiledAsStaticField in ClassWithImplicitConstructor.compiledAsGenericStaticMethod (x)) @ (57,26--57,101)"; + "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; + "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; + "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; + "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; + "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; + "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; + "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; + "let quotationTest1(unitVar0) = quote(Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),1,1)) @ (83,24--83,35)"; + "let quotationTest2(v) = quote(Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; + "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; + "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; + "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; + "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; + "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; + "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; + "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; + "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; + "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; + "do Console.WriteLine (\"777\")"; + "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; + "type MultiArgMethods"; + "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; + "member Method(x) (a,b) = 1 @ (106,37--106,38)"; + "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; + "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),m.Method(7,8),fun tupledArg -> let arg00: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg01: Microsoft.FSharp.Core.int = tupledArg.Item1 in fun tupledArg -> let arg10: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg11: Microsoft.FSharp.Core.int = tupledArg.Item1 in m.CurriedMethod(arg00,arg01,arg10,arg11) (9,10) (11,12)) @ (110,8--110,9)"; + "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (arg0_0,arg1_0),x,y) @ (122,70--122,75)"; + "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress, false, ILArrayShape [(Some 0, None)], !0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; + "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; + "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> DateTime.op_Subtraction (arg0_0,arg1_0),dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> DateTime.op_Subtraction (arg0_0,arg1_0),dt6,dt4) in dt7 @ (142,7--142,10)"; + "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,1) done; x) @ (152,15--152,16)"; + "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; + "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; + "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; + "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; + "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; + "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; + "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; + "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; + "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; + "let f(x) (y) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,y) @ (207,12--207,15)"; + "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; + "let h = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),M.g () 2,3) @ (209,8--209,17)"; + "type TestFuncProp"; + "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; + "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; + "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; + "let start(name) = (name,name) @ (217,4--217,14)"; + "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; + "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; + "let test7(s) = Operators.op_PipeRight (M.start (s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (226,4--226,19)"; + "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; + "let test9(s) = Operators.op_PipeRight ((s,s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (232,4--232,17)"; + "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; + "let test11(s) = Operators.op_PipeRight (s,fun name -> M.last2 (name)) @ (238,4--238,14)"; + "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; + "type LetLambda"; + "let f = ((); fun a -> fun b -> Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),a,b)) @ (246,8--247,24)"; + "let letLambdaRes = Operators.op_PipeRight<(Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list,Microsoft.FSharp.Core.int Microsoft.FSharp.Collections.list> (Cons((1,2),Empty()),let mapping: Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int -> Microsoft.FSharp.Core.int = fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b in fun list -> ListModule.Map (mapping,list)) @ (249,19--249,71)"; + "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)"; + "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)"] + let expected2 = + ["type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; + "let testHashChar(x) = Operators.Hash (x) @ (8,28--8,34)"; + "let testHashSByte(x) = Operators.Hash (x) @ (9,30--9,36)"; + "let testHashInt16(x) = Operators.Hash (x) @ (10,30--10,36)"; + "let testHashInt64(x) = Operators.Hash (x) @ (11,30--11,36)"; + "let testHashUInt64(x) = Operators.Hash (x) @ (12,32--12,38)"; + "let testHashIntPtr(x) = Operators.Hash (x) @ (13,35--13,41)"; + "let testHashUIntPtr(x) = Operators.Hash (x) @ (14,37--14,43)"; + "let testHashString(x) = Operators.Hash (x) @ (16,32--16,38)"; + "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; + "let mutableVar(x) = (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (20,4--22,16)"; + "let mutableConst(unitVar0) = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (25,16--25,19)"; + "let testMutableVar = N.mutableVar (1) @ (28,21--28,33)"; + "let testMutableConst = N.mutableConst (()) @ (29,23--29,38)"] + + printfn "// unoptimized" + printfn "let expected =\n%A" (printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList) + printfn "let expected2 =\n%A" (printDeclarations None (List.ofSeq file2.Declarations) |> Seq.toList) printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> Utils.filterHack @@ -851,9 +853,12 @@ let ``Test Unoptimized Declarations Project1`` () = () -/// This test is run in unison with its unoptimized counterpart below +[] let ``Test Optimized Declarations Project1`` () = - let wholeProjectResults = exprChecker.ParseAndCheckProject(snd Project1.options.Value) |> Async.RunSynchronously + let cleanup, options = Project1.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously for e in wholeProjectResults.Errors do printfn "Project1 error: <<<%s>>>" e.Message @@ -867,112 +872,111 @@ let ``Test Optimized Declarations Project1`` () = let file1 = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[0] let file2 = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[1] - let expected = [ - "type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; - "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; - "let tupleEx1 = (1,1) @ (9,16--9,21)"; - "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; - "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; - "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; - "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; - "let funcEx1(x) = x @ (23,23--23,24)"; - "let genericFuncEx1(x) = x @ (24,29--24,30)"; - "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; - "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; - "let testILCall1 = new Object() @ (27,18--27,27)"; - "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; - "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; - "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; - "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; - "type ClassWithImplicitConstructor"; - "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; - "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; - "member M1(__) (unitVar1) = Operators.op_Addition (Operators.op_Addition (__.compiledAsField,__.compiledAsGenericInstanceMethod(__.compiledAsField)),__.compiledAsArg) @ (55,21--55,102)"; - "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; - "member SM1(unitVar0) = Operators.op_Addition (compiledAsStaticField,ClassWithImplicitConstructor.compiledAsGenericStaticMethod (compiledAsStaticField)) @ (57,26--57,101)"; - "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; - "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; - "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; - "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; - "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; - "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; - "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; - "let quotationTest1(unitVar0) = quote(Operators.op_Addition (1,1)) @ (83,24--83,35)"; - "let quotationTest2(v) = quote(Operators.op_Addition (ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; - "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; - "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; - "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; - "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; - "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; - "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; - "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; - "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; - "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; - "do Console.WriteLine (\"777\")"; - "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; - "type MultiArgMethods"; - "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; - "member Method(x) (a,b) = 1 @ (106,37--106,38)"; - "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; - "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (m.Method(7,8),let arg00: Microsoft.FSharp.Core.int = 9 in let arg01: Microsoft.FSharp.Core.int = 10 in let arg10: Microsoft.FSharp.Core.int = 11 in let arg11: Microsoft.FSharp.Core.int = 12 in m.CurriedMethod(arg00,arg01,arg10,arg11)) @ (110,8--110,9)"; - "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (x,y) @ (122,70--122,75)"; - "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress, false, ILArrayShape [(Some 0, null)], !0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; - "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; - "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = DateTime.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = DateTime.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; - "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (x,1) done; x) @ (152,15--152,16)"; - "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; - "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; - "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; - "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; - "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; - "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; - "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; - "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; - "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; - "let f(x) (y) = Operators.op_Addition (x,y) @ (207,12--207,15)"; - "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; - "let h = Operators.op_Addition (M.g () 2,3) @ (209,8--209,17)"; - "type TestFuncProp"; - "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; - "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; - "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; - "let start(name) = (name,name) @ (217,4--217,14)"; - "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; - "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; - "let test7(s) = let tupledArg: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = M.start (s) in let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (226,4--226,19)"; - "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; - "let test9(s) = M.last (s,s) @ (232,4--232,17)"; - "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; - "let test11(s) = M.last2 (s) @ (238,4--238,14)"; - "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; - "type LetLambda"; - "let f = fun a -> fun b -> Operators.op_Addition (a,b) @ (247,8--247,24)"; - "let letLambdaRes = ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Cons((1,2),Empty())) @ (249,19--249,71)"; - "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)" - "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)" - ] - - let expected2 = [ - "type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; - "let testHashChar(x) = Operators.op_BitwiseOr (Operators.op_LeftShift (x,16),x) @ (8,28--8,34)"; - "let testHashSByte(x) = Operators.op_ExclusiveOr (Operators.op_LeftShift (x,8),x) @ (9,30--9,36)"; - "let testHashInt16(x) = Operators.op_BitwiseOr (Operators.ToUInt16 (x),Operators.op_LeftShift (x,16)) @ (10,30--10,36)"; - "let testHashInt64(x) = Operators.op_ExclusiveOr (Operators.ToInt32 (x),Operators.ToInt32 (Operators.op_RightShift (x,32))) @ (11,30--11,36)"; - "let testHashUInt64(x) = Operators.op_ExclusiveOr (Operators.ToInt32 (x),Operators.ToInt32 (Operators.op_RightShift (x,32))) @ (12,32--12,38)"; - "let testHashIntPtr(x) = Operators.ToInt32 (Operators.ToUInt64 (x)) @ (13,35--13,41)"; - "let testHashUIntPtr(x) = Operators.op_BitwiseAnd (Operators.ToInt32 (Operators.ToUInt64 (x)),2147483647) @ (14,37--14,43)"; - "let testHashString(x) = (if Operators.op_Equality (x,dflt) then 0 else x.GetHashCode()) @ (16,32--16,38)"; - "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; - "let mutableVar(x) = (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (20,4--22,16)"; - "let mutableConst(unitVar0) = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (25,16--25,19)"; - "let testMutableVar = let x: Microsoft.FSharp.Core.int = 1 in (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (28,21--28,33)"; - "let testMutableConst = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (29,23--29,38)"; - ] + let expected = + ["type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; + "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; + "let tupleEx1 = (1,1) @ (9,16--9,21)"; + "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; + "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; + "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; + "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; + "let funcEx1(x) = x @ (23,23--23,24)"; + "let genericFuncEx1(x) = x @ (24,29--24,30)"; + "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; + "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; + "let testILCall1 = new Object() @ (27,18--27,27)"; + "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; + "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; + "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; + "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; + "type ClassWithImplicitConstructor"; + "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; + "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; + "member M1(__) (unitVar1) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),__.compiledAsField,__.compiledAsGenericInstanceMethod(__.compiledAsField)),__.compiledAsArg) @ (55,21--55,102)"; + "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; + "member SM1(unitVar0) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),compiledAsStaticField,ClassWithImplicitConstructor.compiledAsGenericStaticMethod (compiledAsStaticField)) @ (57,26--57,101)"; + "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; + "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; + "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; + "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; + "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; + "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; + "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; + "let quotationTest1(unitVar0) = quote(Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),1,1)) @ (83,24--83,35)"; + "let quotationTest2(v) = quote(Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; + "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; + "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; + "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; + "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; + "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; + "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; + "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; + "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; + "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; + "do Console.WriteLine (\"777\")"; + "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; + "type MultiArgMethods"; + "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; + "member Method(x) (a,b) = 1 @ (106,37--106,38)"; + "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; + "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),m.Method(7,8),let arg00: Microsoft.FSharp.Core.int = 9 in let arg01: Microsoft.FSharp.Core.int = 10 in let arg10: Microsoft.FSharp.Core.int = 11 in let arg11: Microsoft.FSharp.Core.int = 12 in m.CurriedMethod(arg00,arg01,arg10,arg11)) @ (110,8--110,9)"; + "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (arg0_0,arg1_0),x,y) @ (122,70--122,75)"; + "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress, false, ILArrayShape [(Some 0, None)], !0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; + "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; + "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = DateTime.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = DateTime.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; + "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,1) done; x) @ (152,15--152,16)"; + "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; + "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; + "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; + "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; + "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; + "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; + "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; + "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; + "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; + "let f(x) (y) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,y) @ (207,12--207,15)"; + "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; + "let h = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),M.g () 2,3) @ (209,8--209,17)"; + "type TestFuncProp"; + "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; + "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; + "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; + "let start(name) = (name,name) @ (217,4--217,14)"; + "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; + "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; + "let test7(s) = let tupledArg: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = M.start (s) in let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (226,4--226,19)"; + "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; + "let test9(s) = M.last (s,s) @ (232,4--232,17)"; + "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; + "let test11(s) = M.last2 (s) @ (238,4--238,14)"; + "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; + "type LetLambda"; + "let f = fun a -> fun b -> Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),a,b) @ (247,8--247,24)"; + "let letLambdaRes = ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Cons((1,2),Empty())) @ (249,19--249,71)"; + "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)"; + "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)"] + let expected2 = + ["type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; + "let testHashChar(x) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),Operators.op_LeftShift (x,16),x) @ (8,28--8,34)"; + "let testHashSByte(x) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),x,8),x) @ (9,30--9,36)"; + "let testHashInt16(x) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),x),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),x,16)) @ (10,30--10,36)"; + "let testHashInt64(x) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),x),Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),x,32))) @ (11,30--11,36)"; + "let testHashUInt64(x) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),x),Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),x,32))) @ (12,32--12,38)"; + "let testHashIntPtr(x) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),x)) @ (13,35--13,41)"; + "let testHashUIntPtr(x) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),x)),2147483647) @ (14,37--14,43)"; + "let testHashString(x) = (if Operators.op_Equality (x,dflt) then 0 else x.GetHashCode()) @ (16,32--16,38)"; + "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; + "let mutableVar(x) = (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (20,4--22,16)"; + "let mutableConst(unitVar0) = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (25,16--25,19)"; + "let testMutableVar = let x: Microsoft.FSharp.Core.int = 1 in (if Operators.op_GreaterThan (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (28,21--28,33)"; + "let testMutableConst = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (29,23--29,38)"] // printFSharpDecls "" file2.Declarations |> Seq.iter (printfn "%s") - + printfn "// optimized" + printfn "let expected =\n%A" (printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList) + printfn "let expected2 =\n%A" (printDeclarations None (List.ofSeq file2.Declarations) |> Seq.toList) printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> Utils.filterHack @@ -985,23 +989,16 @@ let ``Test Optimized Declarations Project1`` () = () -[] -let ``Test Optimized and Unoptimized Declarations for Project1`` () = - let filenames = fst Project1.options.Value - try - ``Test Optimized Declarations Project1`` () - ``Test Unoptimized Declarations Project1`` () - finally - Utils.cleanupTempFiles filenames - let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimized = let tempFileName = Utils.getTempFileName() let filePath = Utils.getTempFilePathChangeExt tempFileName ".fs" let dllPath =Utils.getTempFilePathChangeExt tempFileName ".dll" let projFilePath = Utils.getTempFilePathChangeExt tempFileName ".fsproj" + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) - try + begin + use _cleanup = Utils.cleanupTempFiles [filePath; dllPath; projFilePath] createTempDir() let source = System.String.Format(Project1.operatorTests, dnName, fsName) let replace (s:string) r = s.Replace("let " + r, "// let " + r) @@ -1018,7 +1015,8 @@ let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimi let fsCore = referencedAssemblies |> List.tryFind (fun asm -> asm.SimpleName = "FSharp.Core") match fsCore with | Some core -> - if core.QualifiedName.StartsWith("FSharp.Core, Version=4.7") then FC47 + if core.QualifiedName.StartsWith("FSharp.Core, Version=5.0") then FC50 + elif core.QualifiedName.StartsWith("FSharp.Core, Version=4.7") then FC47 elif core.QualifiedName.StartsWith("FSharp.Core, Version=4.6") then FC46 else FC45 | None -> FC45 @@ -1047,6 +1045,7 @@ let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimi let mutable countFC45 = 0 let mutable countFC46 = 0 let mutable countFC47 = 0 + let mutable countFC50 = 0 /// Filter for allowed FSharp.Core definition. Optimizations can differ between Core versions let filterTests result expected = @@ -1056,11 +1055,13 @@ let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimi countFC45 <- countFC45 + 1 countFC46 <- countFC46 + 1 countFC47 <- countFC47 + 1 + countFC50 <- countFC50 + 1 Some(result, s) else if when' |> List.contains FC45 then countFC45 <- countFC45 + 1 if when' |> List.contains FC46 then countFC46 <- countFC46 + 1 if when' |> List.contains FC47 then countFC47 <- countFC47 + 1 + if when' |> List.contains FC50 then countFC50 <- countFC50 + 1 if when' |> List.contains currentAssemblyToken then Some(result, s) else @@ -1071,16 +1072,25 @@ let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimi printfn "Running in %O mode (%s)" currentAssemblyToken (FSharpCore.fsharpVersion currentAssemblyToken) let resultUnoptFiltered, expectedUnoptFiltered = filterTests resultUnoptimized expectedUnoptimized - printfn "Unoptimized FC45 tests: %i, FC46 tests: %i, FC47 tests: %i" countFC45 countFC46 countFC47 + printfn "Unoptimized FC45 tests: %i, FC46 tests: %i, FC47 tests: %i, FC50 tests: %i" countFC45 countFC46 countFC47 countFC50 printfn "Unfiltered unoptimized: %i, filtered: %i" (List.length expectedUnoptimized) (List.length expectedUnoptFiltered) countFC45 <- 0 countFC46 <- 0 countFC47 <- 0 + countFC50 <- 0 let resultOptFiltered, expectedOptFiltered = filterTests resultOptimized expectedOptimized - printfn "Optimized FC45 tests: %i, FC46 tests: %i, FC47 tests: %i" countFC45 countFC46 countFC47 + printfn "Optimized FC45 tests: %i, FC46 tests: %i, FC47 tests: %i, FC50 tests: %i" countFC45 countFC46 countFC47 countFC50 printfn "Unfiltered optimized: %i, filtered: %i" (List.length expectedOptimized) (List.length expectedOptFiltered) + printfn " let expectedUnoptimized = [" + for s in resultUnoptFiltered do + printfn " [], %A" s + printfn " ]" + printfn " let expectedOptimized = [" + for s in resultOptFiltered do + printfn " [%s], %A" (if s.Contains("ToStringOperator") then "FC47; FC50" else "") s + printfn " ]" // fail test on first line that fails, show difference in output window resultUnoptFiltered |> shouldPairwiseEqual expectedUnoptFiltered @@ -1088,11 +1098,7 @@ let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimi // fail test on first line that fails, show difference in output window resultOptFiltered |> shouldPairwiseEqual expectedOptFiltered - - finally - Utils.cleanupTempFiles [filePath; dllPath; projFilePath] - - () + end [] let ``Test Operator Declarations for Byte`` () = @@ -1102,104 +1108,104 @@ let ``Test Operator Declarations for Byte`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsByte"; - [], "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)"; - [], "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,63--5,73)"; - [], "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)"; - [], "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,63--7,73)"; - [], "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)"; - [], "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,63--9,73)"; - [], "let testByteAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,55--11,64)"; - [], "let testByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,55--12,64)"; - [], "let testByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,55--13,64)"; - [], "let testByteDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,55--14,64)"; - [], "let testByteModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,55--15,64)"; - [], "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,55--16,66)"; - [], "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,55--17,66)"; - [], "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,55--18,66)"; - [], "let testByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,54--19,65)"; - [], "let testByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,54--20,65)"; - [], "let testByteAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,53--24,70)"; - [], "let testByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,53--25,70)"; - [], "let testByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,53--26,70)"; - [], "let testByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; - [], "let testByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; - [], "let testByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; - [], "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; - [], "let testByteToIntChecked(e1) = Checked.ToInt (e1) @ (33,43--33,57)"; - [], "let testByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; - [], "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; - [], "let testByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; - [], "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; - [], "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; - [], "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; - [], "let testByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; - [], "let testByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; - [], "let testByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; - [], "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; - [], "let testByteToIntOperator(e1) = Operators.ToInt (e1) @ (45,43--45,49)"; - [], "let testByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; - [], "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; - [], "let testByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,43--48,51)"; - [], "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; - [], "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; - [], "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; - [], "let testByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,43--52,53)"; - [], "let testByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,43--53,51)"; - [], "let testByteToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,43--54,53)"; - [], "let testByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; - [], "let testByteToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)"; + [], "type OperatorTestsByte" + [], "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)" + [], "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,63--5,73)" + [], "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)" + [], "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,63--7,73)" + [], "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)" + [], "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,63--9,73)" + [], "let testByteAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,55--11,64)" + [], "let testByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,55--12,64)" + [], "let testByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,55--13,64)" + [], "let testByteDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,55--14,64)" + [], "let testByteModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,55--15,64)" + [], "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,55--16,66)" + [], "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,55--17,66)" + [], "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,55--18,66)" + [], "let testByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,54--19,65)" + [], "let testByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,54--20,65)" + [], "let testByteAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,53--24,70)" + [], "let testByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,53--25,70)" + [], "let testByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,53--26,70)" + [], "let testByteToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,43--29,58)" + [], "let testByteToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,43--30,59)" + [], "let testByteToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,43--31,59)" + [], "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,43--32,60)" + [], "let testByteToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,43--33,57)" + [], "let testByteToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,43--34,59)" + [], "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,43--35,60)" + [], "let testByteToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,43--36,59)" + [], "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,43--37,60)" + [], "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,43--38,63)" + [], "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,43--39,64)" + [], "let testByteToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,43--41,50)" + [], "let testByteToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,43--42,51)" + [], "let testByteToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,43--43,51)" + [], "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,43--44,52)" + [], "let testByteToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,43--45,49)" + [], "let testByteToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,43--46,51)" + [], "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,43--47,52)" + [], "let testByteToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,43--48,51)" + [], "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,43--49,52)" + [], "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,43--50,55)" + [], "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,43--51,56)" + [], "let testByteToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,43--52,53)" + [], "let testByteToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,43--53,51)" + [], "let testByteToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,43--54,53)" + [], "let testByteToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,43--55,50)" + [], "let testByteToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)" ] - let expectedOptimized = [ - [], "type OperatorTestsByte"; - [], "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)"; - [], "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,63--5,73)"; - [], "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)"; - [], "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,63--7,73)"; - [], "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)"; - [], "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,63--9,73)"; - [], "let testByteAdditionOperator(e1) (e2) = Operators.ToByte (Operators.op_Addition (e1,e2)) @ (11,55--11,64)"; - [], "let testByteSubtractionOperator(e1) (e2) = Operators.ToByte (Operators.op_Subtraction (e1,e2)) @ (12,55--12,64)"; - [], "let testByteMultiplyOperator(e1) (e2) = Operators.ToByte (Operators.op_Multiply (e1,e2)) @ (13,55--13,64)"; - [], "let testByteDivisionOperator(e1) (e2) = Operators.ToByte (Operators.op_Division (e1,e2)) @ (14,55--14,64)"; - [], "let testByteModulusOperator(e1) (e2) = Operators.ToByte (Operators.op_Modulus (e1,e2)) @ (15,55--15,64)"; - [], "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,55--16,66)"; - [], "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,55--17,66)"; - [], "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,55--18,66)"; - [], "let testByteShiftLeftOperator(e1) (e2) = Operators.ToByte (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (19,54--19,65)"; - [], "let testByteShiftRightOperator(e1) (e2) = Operators.ToByte (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (20,54--20,65)"; - [], "let testByteAdditionChecked(e1) (e2) = Checked.ToByte (Checked.op_Addition (e1,e2)) @ (24,53--24,70)"; - [], "let testByteSubtractionChecked(e1) (e2) = Checked.ToByte (Checked.op_Subtraction (e1,e2)) @ (25,53--25,70)"; - [], "let testByteMultiplyChecked(e1) (e2) = Checked.ToByte (Checked.op_Multiply (e1,e2)) @ (26,53--26,70)"; - [], "let testByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; - [], "let testByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; - [], "let testByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; - [], "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; - [], "let testByteToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,43--33,57)"; - [], "let testByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; - [], "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; - [], "let testByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; - [], "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; - [], "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; - [], "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; - [], "let testByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; - [], "let testByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; - [], "let testByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; - [], "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; - [], "let testByteToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,43--45,49)"; - [], "let testByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; - [], "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; - [], "let testByteToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,43--48,51)"; - [], "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; - [], "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; - [], "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; - [], "let testByteToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,43--52,53)"; - [], "let testByteToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,43--53,51)"; - [], "let testByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,43--54,53)"; - [], "let testByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; - [FC47], "let testByteToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.byte = e1 in copyOfStruct.ToString() @ (56,43--56,52)" - ] + [], "type OperatorTestsByte" + [], "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)" + [], "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,63--5,73)" + [], "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)" + [], "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,63--7,73)" + [], "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)" + [], "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,63--9,73)" + [], "let testByteAdditionOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (11,55--11,64)" + [], "let testByteSubtractionOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (12,55--12,64)" + [], "let testByteMultiplyOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (13,55--13,64)" + [], "let testByteDivisionOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2)) @ (14,55--14,64)" + [], "let testByteModulusOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2)) @ (15,55--15,64)" + [], "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,55--16,66)" + [], "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,55--17,66)" + [], "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,55--18,66)" + [], "let testByteShiftLeftOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,7))) @ (19,54--19,65)" + [], "let testByteShiftRightOperator(e1) (e2) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,7))) @ (20,54--20,65)" + [], "let testByteAdditionChecked(e1) (e2) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (24,53--24,70)" + [], "let testByteSubtractionChecked(e1) (e2) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (25,53--25,70)" + [], "let testByteMultiplyChecked(e1) (e2) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (26,53--26,70)" + [], "let testByteToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,43--29,58)" + [], "let testByteToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,43--30,59)" + [], "let testByteToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,43--31,59)" + [], "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,43--32,60)" + [], "let testByteToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,43--33,57)" + [], "let testByteToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,43--34,59)" + [], "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,43--35,60)" + [], "let testByteToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,43--36,59)" + [], "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,43--37,60)" + [], "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,43--38,63)" + [], "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,43--39,64)" + [], "let testByteToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,43--41,50)" + [], "let testByteToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,43--42,51)" + [], "let testByteToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,43--43,51)" + [], "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,43--44,52)" + [], "let testByteToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,43--45,49)" + [], "let testByteToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,43--46,51)" + [], "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,43--47,52)" + [], "let testByteToInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,43--48,51)" + [], "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,43--49,52)" + [], "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,43--50,55)" + [], "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,43--51,56)" + [], "let testByteToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,43--52,53)" + [], "let testByteToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,43--53,51)" + [], "let testByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,43--54,53)" + [], "let testByteToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,43--55,50)" + [FC47; FC50], "let testByteToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.byte = e1 in copyOfStruct.ToString() @ (56,43--56,52)" + ] + testOperators "Byte" "byte" excludedTests expectedUnoptimized expectedOptimized @@ -1209,108 +1215,107 @@ let ``Test Operator Declarations for SByte`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsSByte"; - [], "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)"; - [], "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)"; - [], "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)"; - [], "let testSByteAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testSByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testSByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testSByteDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testSByteModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testSByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,56--19,67)"; - [], "let testSByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,56--20,67)"; - [], "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testSByteAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testSByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testSByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testSByteUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; - [], "let testSByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testSByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testSByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testSByteToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; - [], "let testSByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testSByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testSByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testSByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testSByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testSByteToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; - [], "let testSByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testSByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testSByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; - [], "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testSByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; - [], "let testSByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testSByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testSByteToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testSByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [], "let testSByteToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + [], "type OperatorTestsSByte" + [], "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)" + [], "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)" + [], "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)" + [], "let testSByteAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testSByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testSByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testSByteDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testSByteModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testSByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,56--19,67)" + [], "let testSByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,56--20,67)" + [], "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testSByteAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testSByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testSByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testSByteUnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,45--27,60)" + [], "let testSByteToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testSByteToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testSByteToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testSByteToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testSByteToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testSByteToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testSByteToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testSByteToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testSByteToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testSByteToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testSByteToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testSByteToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testSByteToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testSByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testSByteToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testSByteToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testSByteToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,45--54,55)" + [], "let testSByteToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [], "let testSByteToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)" ] - let expectedOptimized = [ - [], "type OperatorTestsSByte"; - [], "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)"; - [], "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)"; - [], "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)"; - [], "let testSByteAdditionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Addition (e1,e2)) @ (11,58--11,67)"; - [], "let testSByteSubtractionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Subtraction (e1,e2)) @ (12,58--12,67)"; - [], "let testSByteMultiplyOperator(e1) (e2) = Operators.ToSByte (Operators.op_Multiply (e1,e2)) @ (13,58--13,67)"; - [], "let testSByteDivisionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Division (e1,e2)) @ (14,58--14,67)"; - [], "let testSByteModulusOperator(e1) (e2) = Operators.ToSByte (Operators.op_Modulus (e1,e2)) @ (15,58--15,67)"; - [], "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testSByteShiftLeftOperator(e1) (e2) = Operators.ToSByte (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (19,56--19,67)"; - [], "let testSByteShiftRightOperator(e1) (e2) = Operators.ToSByte (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (20,56--20,67)"; - [], "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testSByteAdditionChecked(e1) (e2) = Checked.ToSByte (Checked.op_Addition (e1,e2)) @ (24,56--24,73)"; - [], "let testSByteSubtractionChecked(e1) (e2) = Checked.ToSByte (Checked.op_Subtraction (e1,e2)) @ (25,56--25,73)"; - [], "let testSByteMultiplyChecked(e1) (e2) = Checked.ToSByte (Checked.op_Multiply (e1,e2)) @ (26,56--26,73)"; - [], "let testSByteUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; - [], "let testSByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testSByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testSByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testSByteToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; - [], "let testSByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testSByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testSByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testSByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testSByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testSByteToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; - [], "let testSByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testSByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testSByteToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; - [], "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testSByteToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; - [], "let testSByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testSByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testSByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testSByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [FC47], "let testSByteToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" - ] + [], "type OperatorTestsSByte" + [], "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)" + [], "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)" + [], "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)" + [], "let testSByteAdditionOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (11,58--11,67)" + [], "let testSByteSubtractionOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (12,58--12,67)" + [], "let testSByteMultiplyOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (13,58--13,67)" + [], "let testSByteDivisionOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2)) @ (14,58--14,67)" + [], "let testSByteModulusOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2)) @ (15,58--15,67)" + [], "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testSByteShiftLeftOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,7))) @ (19,56--19,67)" + [], "let testSByteShiftRightOperator(e1) (e2) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,7))) @ (20,56--20,67)" + [], "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testSByteAdditionChecked(e1) (e2) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (24,56--24,73)" + [], "let testSByteSubtractionChecked(e1) (e2) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (25,56--25,73)" + [], "let testSByteMultiplyChecked(e1) (e2) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (26,56--26,73)" + [], "let testSByteUnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,45--27,60)" + [], "let testSByteToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testSByteToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testSByteToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testSByteToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testSByteToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testSByteToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testSByteToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testSByteToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testSByteToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testSByteToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testSByteToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testSByteToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testSByteToUInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testSByteToUIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testSByteToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testSByteToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testSByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)" + [], "let testSByteToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [FC47; FC50], "let testSByteToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" + ] testOperators "SByte" "sbyte" excludedTests expectedUnoptimized expectedOptimized @@ -1319,107 +1324,106 @@ let ``Test Operator Declarations for Int16`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsInt16"; - [], "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)"; - [], "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)"; - [], "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)"; - [], "let testInt16AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testInt16DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,56--19,67)"; - [], "let testInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,56--20,67)"; - [], "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt16AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testInt16UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; - [], "let testInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt16ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; - [], "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt16ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; - [], "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; - [], "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt16ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [], "let testInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + [], "type OperatorTestsInt16" + [], "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)" + [], "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)" + [], "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)" + [], "let testInt16AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testInt16DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,56--19,67)" + [], "let testInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,56--20,67)" + [], "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt16AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testInt16UnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,45--27,60)" + [], "let testInt16ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt16ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt16ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt16ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt16ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt16ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt16ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt16ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt16ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,45--54,55)" + [], "let testInt16ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [], "let testInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)" ] - let expectedOptimized = [ - [], "type OperatorTestsInt16"; - [], "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)"; - [], "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)"; - [], "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)"; - [], "let testInt16AdditionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Addition (e1,e2)) @ (11,58--11,67)"; - [], "let testInt16SubtractionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Subtraction (e1,e2)) @ (12,58--12,67)"; - [], "let testInt16MultiplyOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Multiply (e1,e2)) @ (13,58--13,67)"; - [], "let testInt16DivisionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Division (e1,e2)) @ (14,58--14,67)"; - [], "let testInt16ModulusOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Modulus (e1,e2)) @ (15,58--15,67)"; - [], "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt16ShiftLeftOperator(e1) (e2) = Operators.ToInt16 (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (19,56--19,67)"; - [], "let testInt16ShiftRightOperator(e1) (e2) = Operators.ToInt16 (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (20,56--20,67)"; - [], "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt16AdditionChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Addition (e1,e2)) @ (24,56--24,73)"; - [], "let testInt16SubtractionChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Subtraction (e1,e2)) @ (25,56--25,73)"; - [], "let testInt16MultiplyChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Multiply (e1,e2)) @ (26,56--26,73)"; - [], "let testInt16UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; - [], "let testInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt16ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; - [], "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt16ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; - [], "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt16ToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; - [], "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt16ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [FC47], "let testInt16ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" + [], "type OperatorTestsInt16" + [], "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)" + [], "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)" + [], "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)" + [], "let testInt16AdditionOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (11,58--11,67)" + [], "let testInt16SubtractionOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (12,58--12,67)" + [], "let testInt16MultiplyOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (13,58--13,67)" + [], "let testInt16DivisionOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2)) @ (14,58--14,67)" + [], "let testInt16ModulusOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2)) @ (15,58--15,67)" + [], "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt16ShiftLeftOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,15))) @ (19,56--19,67)" + [], "let testInt16ShiftRightOperator(e1) (e2) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,15))) @ (20,56--20,67)" + [], "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt16AdditionChecked(e1) (e2) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (24,56--24,73)" + [], "let testInt16SubtractionChecked(e1) (e2) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (25,56--25,73)" + [], "let testInt16MultiplyChecked(e1) (e2) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (26,56--26,73)" + [], "let testInt16UnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,45--27,60)" + [], "let testInt16ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt16ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt16ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt16ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt16ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt16ToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt16ToUInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt16ToUIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt16ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)" + [], "let testInt16ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [FC47; FC50], "let testInt16ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" ] testOperators "Int16" "int16" excludedTests expectedUnoptimized expectedOptimized @@ -1432,103 +1436,102 @@ let ``Test Operator Declarations for UInt16`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsUInt16"; - [], "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)"; - [], "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)"; - [], "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)"; - [], "let testUInt16AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testUInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,61--12,70)"; - [], "let testUInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; - [], "let testUInt16DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,61--14,70)"; - [], "let testUInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,61--15,70)"; - [], "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,58--19,69)"; - [], "let testUInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,58--20,69)"; - [], "let testUInt16AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testUInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; - [], "let testUInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; - [], "let testUInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt16ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; - [], "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt16ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; - [], "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testUInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; - [], "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; - [], "let testUInt16ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [], "let testUInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + [], "type OperatorTestsUInt16" + [], "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)" + [], "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)" + [], "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)" + [], "let testUInt16AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testUInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,61--12,70)" + [], "let testUInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,61--13,70)" + [], "let testUInt16DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,61--14,70)" + [], "let testUInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,61--15,70)" + [], "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,58--19,69)" + [], "let testUInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,58--20,69)" + [], "let testUInt16AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testUInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,59--25,76)" + [], "let testUInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,59--26,76)" + [], "let testUInt16ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt16ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt16ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt16ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt16ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testUInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,47--52,57)" + [], "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,47--53,55)" + [], "let testUInt16ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,47--54,57)" + [], "let testUInt16ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [], "let testUInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)" ] - let expectedOptimized = [ - [], "type OperatorTestsUInt16"; - [], "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)"; - [], "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)"; - [], "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)"; - [], "let testUInt16AdditionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Addition (e1,e2)) @ (11,61--11,70)"; - [], "let testUInt16SubtractionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Subtraction (e1,e2)) @ (12,61--12,70)"; - [], "let testUInt16MultiplyOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Multiply (e1,e2)) @ (13,61--13,70)"; - [], "let testUInt16DivisionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Division (e1,e2)) @ (14,61--14,70)"; - [], "let testUInt16ModulusOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Modulus (e1,e2)) @ (15,61--15,70)"; - [], "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (19,58--19,69)"; - [], "let testUInt16ShiftRightOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (20,58--20,69)"; - [], "let testUInt16AdditionChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Addition (e1,e2)) @ (24,59--24,76)"; - [], "let testUInt16SubtractionChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Subtraction (e1,e2)) @ (25,59--25,76)"; - [], "let testUInt16MultiplyChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Multiply (e1,e2)) @ (26,59--26,76)"; - [], "let testUInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt16ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; - [], "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt16ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; - [], "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt16ToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testUInt16ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; - [], "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; - [], "let testUInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [FC47], "let testUInt16ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint16 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" + [], "type OperatorTestsUInt16" + [], "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)" + [], "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)" + [], "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)" + [], "let testUInt16AdditionOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (11,61--11,70)" + [], "let testUInt16SubtractionOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (12,61--12,70)" + [], "let testUInt16MultiplyOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (13,61--13,70)" + [], "let testUInt16DivisionOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2)) @ (14,61--14,70)" + [], "let testUInt16ModulusOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2)) @ (15,61--15,70)" + [], "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,15))) @ (19,58--19,69)" + [], "let testUInt16ShiftRightOperator(e1) (e2) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,15))) @ (20,58--20,69)" + [], "let testUInt16AdditionChecked(e1) (e2) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (24,59--24,76)" + [], "let testUInt16SubtractionChecked(e1) (e2) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2)) @ (25,59--25,76)" + [], "let testUInt16MultiplyChecked(e1) (e2) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2)) @ (26,59--26,76)" + [], "let testUInt16ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt16ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt16ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt16ToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt16ToInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testUInt16ToIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,47--52,57)" + [], "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,47--53,55)" + [], "let testUInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)" + [], "let testUInt16ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [FC47; FC50], "let testUInt16ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint16 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" ] testOperators "UInt16" "uint16" excludedTests expectedUnoptimized expectedOptimized @@ -1538,107 +1541,106 @@ let ``Test Operator Declarations for Int`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsInt"; - [], "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,60--4,69)"; - [], "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,60--5,70)"; - [], "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,60--6,69)"; - [], "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,60--7,70)"; - [], "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,60--8,69)"; - [], "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,60--9,70)"; - [], "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,52--11,61)"; - [], "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,52--12,61)"; - [], "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,52--13,61)"; - [], "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,52--14,61)"; - [], "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,52--15,61)"; - [], "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,52--16,63)"; - [], "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,52--17,63)"; - [], "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,52--18,63)"; - [], "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,52--19,63)"; - [], "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,52--20,63)"; - [], "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,41--22,48)"; - [], "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,50--24,67)"; - [], "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,50--25,67)"; - [], "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,50--26,67)"; - [], "let testIntUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,41--27,56)"; - [], "let testIntToByteChecked(e1) = Checked.ToByte (e1) @ (29,41--29,56)"; - [], "let testIntToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,41--30,57)"; - [], "let testIntToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,41--31,57)"; - [], "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,41--32,58)"; - [], "let testIntToIntChecked(e1) = Checked.ToInt (e1) @ (33,41--33,55)"; - [], "let testIntToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,41--34,57)"; - [], "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,41--35,58)"; - [], "let testIntToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,41--36,57)"; - [], "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,41--37,58)"; - [], "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,41--38,61)"; - [], "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,41--39,62)"; - [], "let testIntToByteOperator(e1) = Operators.ToByte (e1) @ (41,41--41,48)"; - [], "let testIntToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,41--42,49)"; - [], "let testIntToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,41--43,49)"; - [], "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,41--44,50)"; - [], "let testIntToIntOperator(e1) = Operators.ToInt (e1) @ (45,41--45,47)"; - [], "let testIntToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,41--46,49)"; - [], "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,41--47,50)"; - [], "let testIntToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,41--48,49)"; - [], "let testIntToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,41--49,50)"; - [], "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,41--50,53)"; - [], "let testIntToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,41--51,54)"; - [], "let testIntToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,41--52,51)"; - [], "let testIntToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,41--53,49)"; - [], "let testIntToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,41--54,51)"; - [], "let testIntToCharOperator(e1) = Operators.ToChar (e1) @ (55,41--55,48)"; - [], "let testIntToStringOperator(e1) = Operators.ToString (e1) @ (56,41--56,50)"; + [], "type OperatorTestsInt" + [], "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,60--4,69)" + [], "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,60--5,70)" + [], "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,60--6,69)" + [], "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,60--7,70)" + [], "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,60--8,69)" + [], "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,60--9,70)" + [], "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,52--11,61)" + [], "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,52--12,61)" + [], "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,52--13,61)" + [], "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,52--14,61)" + [], "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,52--15,61)" + [], "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,52--16,63)" + [], "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,52--17,63)" + [], "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,52--18,63)" + [], "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,52--19,63)" + [], "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,52--20,63)" + [], "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,41--22,48)" + [], "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,50--24,67)" + [], "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,50--25,67)" + [], "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,50--26,67)" + [], "let testIntUnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,41--27,56)" + [], "let testIntToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,41--29,56)" + [], "let testIntToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,41--30,57)" + [], "let testIntToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,41--31,57)" + [], "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,41--32,58)" + [], "let testIntToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,41--33,55)" + [], "let testIntToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,41--34,57)" + [], "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,41--35,58)" + [], "let testIntToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,41--36,57)" + [], "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,41--37,58)" + [], "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,41--38,61)" + [], "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,41--39,62)" + [], "let testIntToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,41--41,48)" + [], "let testIntToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,41--42,49)" + [], "let testIntToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,41--43,49)" + [], "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,41--44,50)" + [], "let testIntToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,41--45,47)" + [], "let testIntToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,41--46,49)" + [], "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,41--47,50)" + [], "let testIntToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,41--48,49)" + [], "let testIntToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,41--49,50)" + [], "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,41--50,53)" + [], "let testIntToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,41--51,54)" + [], "let testIntToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,41--52,51)" + [], "let testIntToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,41--53,49)" + [], "let testIntToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,41--54,51)" + [], "let testIntToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,41--55,48)" + [], "let testIntToStringOperator(e1) = Operators.ToString (e1) @ (56,41--56,50)" ] - let expectedOptimized = [ - [], "type OperatorTestsInt"; - [], "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,60--4,69)"; - [], "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,60--5,70)"; - [], "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,60--6,69)"; - [], "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,60--7,70)"; - [], "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,60--8,69)"; - [], "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,60--9,70)"; - [], "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,52--11,61)"; - [], "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,52--12,61)"; - [], "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,52--13,61)"; - [], "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,52--14,61)"; - [], "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,52--15,61)"; - [], "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,52--16,63)"; - [], "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,52--17,63)"; - [], "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,52--18,63)"; - [], "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,52--19,63)"; - [], "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,52--20,63)"; - [], "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,41--22,48)"; - [], "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,50--24,67)"; - [], "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,50--25,67)"; - [], "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,50--26,67)"; - [], "let testIntUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,41--27,56)"; - [], "let testIntToByteChecked(e1) = Checked.ToByte (e1) @ (29,41--29,56)"; - [], "let testIntToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,41--30,57)"; - [], "let testIntToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,41--31,57)"; - [], "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,41--32,58)"; - [], "let testIntToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,41--33,55)"; - [], "let testIntToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,41--34,57)"; - [], "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,41--35,58)"; - [], "let testIntToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,41--36,57)"; - [], "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,41--37,58)"; - [], "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,41--38,61)"; - [], "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,41--39,62)"; - [], "let testIntToByteOperator(e1) = Operators.ToByte (e1) @ (41,41--41,48)"; - [], "let testIntToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,41--42,49)"; - [], "let testIntToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,41--43,49)"; - [], "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,41--44,50)"; - [], "let testIntToIntOperator(e1) = e1 @ (45,45--45,47)"; - [], "let testIntToInt32Operator(e1) = e1 @ (46,47--46,49)"; - [], "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,41--47,50)"; - [], "let testIntToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,41--48,49)"; - [], "let testIntToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,41--49,50)"; - [], "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,41--50,53)"; - [], "let testIntToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,41--51,54)"; - [], "let testIntToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,41--52,51)"; - [], "let testIntToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,41--53,49)"; - [], "let testIntToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,41--54,51)"; - [], "let testIntToCharOperator(e1) = Operators.ToChar (e1) @ (55,41--55,48)"; - [FC47], "let testIntToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,41--56,50)" + [], "type OperatorTestsInt" + [], "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,60--4,69)" + [], "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,60--5,70)" + [], "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,60--6,69)" + [], "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,60--7,70)" + [], "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,60--8,69)" + [], "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,60--9,70)" + [], "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,52--11,61)" + [], "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,52--12,61)" + [], "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,52--13,61)" + [], "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,52--14,61)" + [], "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,52--15,61)" + [], "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,52--16,63)" + [], "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,52--17,63)" + [], "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,52--18,63)" + [], "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (19,52--19,63)" + [], "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (20,52--20,63)" + [], "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,41--22,48)" + [], "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,50--24,67)" + [], "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,50--25,67)" + [], "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,50--26,67)" + [], "let testIntUnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,41--27,56)" + [], "let testIntToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,41--29,56)" + [], "let testIntToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,41--30,57)" + [], "let testIntToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,41--31,57)" + [], "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,41--32,58)" + [], "let testIntToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,41--33,55)" + [], "let testIntToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,41--34,57)" + [], "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,41--35,58)" + [], "let testIntToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,41--36,57)" + [], "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,41--37,58)" + [], "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,41--38,61)" + [], "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,41--39,62)" + [], "let testIntToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,41--41,48)" + [], "let testIntToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,41--42,49)" + [], "let testIntToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,41--43,49)" + [], "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,41--44,50)" + [], "let testIntToIntOperator(e1) = e1 @ (45,45--45,47)" + [], "let testIntToInt32Operator(e1) = e1 @ (46,47--46,49)" + [], "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,41--47,50)" + [], "let testIntToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,41--48,49)" + [], "let testIntToUInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,41--49,50)" + [], "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,41--50,53)" + [], "let testIntToUIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,41--51,54)" + [], "let testIntToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,41--52,51)" + [], "let testIntToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,41--53,49)" + [], "let testIntToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,41--54,51)" + [], "let testIntToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,41--55,48)" + [FC47; FC50], "let testIntToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,41--56,50)" ] testOperators "Int" "int" excludedTests expectedUnoptimized expectedOptimized @@ -1648,109 +1650,109 @@ let ``Test Operator Declarations for Int32`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsInt32"; - [], "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)"; - [], "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)"; - [], "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)"; - [], "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,56--19,67)"; - [], "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,56--20,67)"; - [], "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testInt32UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; - [], "let testInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt32ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; - [], "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt32ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; - [], "let testInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; - [], "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt32ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [], "let testInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + [], "type OperatorTestsInt32" + [], "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)" + [], "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)" + [], "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)" + [], "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,56--19,67)" + [], "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,56--20,67)" + [], "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testInt32UnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,45--27,60)" + [], "let testInt32ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt32ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt32ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt32ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt32ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt32ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testInt32ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt32ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt32ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt32ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,45--54,55)" + [], "let testInt32ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [], "let testInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)" ] - let expectedOptimized = [ - [], "type OperatorTestsInt32"; - [], "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)"; - [], "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)"; - [], "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)"; - [], "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,56--19,67)"; - [], "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,56--20,67)"; - [], "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testInt32UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; - [], "let testInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt32ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; - [], "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt32ToIntOperator(e1) = e1 @ (45,49--45,51)"; - [], "let testInt32ToInt32Operator(e1) = e1 @ (46,51--46,53)"; - [], "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt32ToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; - [], "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt32ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [FC47], "let testInt32ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" + [], "type OperatorTestsInt32" + [], "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)" + [], "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)" + [], "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)" + [], "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (19,56--19,67)" + [], "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (20,56--20,67)" + [], "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testInt32UnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,45--27,60)" + [], "let testInt32ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt32ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt32ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt32ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt32ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt32ToIntOperator(e1) = e1 @ (45,49--45,51)" + [], "let testInt32ToInt32Operator(e1) = e1 @ (46,51--46,53)" + [], "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt32ToUInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt32ToUIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt32ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)" + [], "let testInt32ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [FC47; FC50], "let testInt32ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" ] + testOperators "Int32" "int32" excludedTests expectedUnoptimized expectedOptimized [] @@ -1761,103 +1763,102 @@ let ``Test Operator Declarations for UInt32`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsUInt32"; - [], "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)"; - [], "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)"; - [], "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)"; - [], "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,61--12,70)"; - [], "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; - [], "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,61--14,70)"; - [], "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,61--15,70)"; - [], "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,58--19,69)"; - [], "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,58--20,69)"; - [], "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; - [], "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; - [], "let testUInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt32ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; - [], "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt32ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; - [], "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testUInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; - [], "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; - [], "let testUInt32ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [], "let testUInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + [], "type OperatorTestsUInt32" + [], "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)" + [], "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)" + [], "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)" + [], "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,61--12,70)" + [], "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,61--13,70)" + [], "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,61--14,70)" + [], "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,61--15,70)" + [], "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,58--19,69)" + [], "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,58--20,69)" + [], "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,59--25,76)" + [], "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,59--26,76)" + [], "let testUInt32ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt32ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt32ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt32ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt32ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testUInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,47--52,57)" + [], "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,47--53,55)" + [], "let testUInt32ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,47--54,57)" + [], "let testUInt32ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [], "let testUInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)" ] - let expectedOptimized = [ - [], "type OperatorTestsUInt32"; - [], "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)"; - [], "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)"; - [], "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)"; - [], "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,61--12,70)"; - [], "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; - [], "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,61--14,70)"; - [], "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,61--15,70)"; - [], "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,58--19,69)"; - [], "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,58--20,69)"; - [], "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; - [], "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; - [], "let testUInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt32ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; - [], "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt32ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; - [], "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt32ToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testUInt32ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; - [], "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; - [], "let testUInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [FC47], "let testUInt32ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint32 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" + [], "type OperatorTestsUInt32" + [], "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)" + [], "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)" + [], "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)" + [], "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,61--12,70)" + [], "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,61--13,70)" + [], "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,61--14,70)" + [], "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,61--15,70)" + [], "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (19,58--19,69)" + [], "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,31)) @ (20,58--20,69)" + [], "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,59--25,76)" + [], "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,59--26,76)" + [], "let testUInt32ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt32ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt32ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt32ToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt32ToInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testUInt32ToIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,47--52,57)" + [], "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,47--53,55)" + [], "let testUInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)" + [], "let testUInt32ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [FC47; FC50], "let testUInt32ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint32 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" ] testOperators "UInt32" "uint32" excludedTests expectedUnoptimized expectedOptimized @@ -1867,109 +1868,109 @@ let ``Test Operator Declarations for Int64`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsInt64"; - [], "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)"; - [], "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)"; - [], "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)"; - [], "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,56--19,67)"; - [], "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,56--20,67)"; - [], "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testInt64UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; - [], "let testInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt64ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; - [], "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt64ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; - [], "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; - [], "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt64ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [], "let testInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + [], "type OperatorTestsInt64" + [], "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,66--5,76)" + [], "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,66--7,76)" + [], "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,66--9,76)" + [], "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,56--19,67)" + [], "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,56--20,67)" + [], "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testInt64UnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,45--27,60)" + [], "let testInt64ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt64ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt64ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt64ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt64ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt64ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt64ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt64ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,45--54,55)" + [], "let testInt64ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [], "let testInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)" ] - let expectedOptimized = [ - [], "type OperatorTestsInt64"; - [], "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)"; - [], "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)"; - [], "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)"; - [], "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)"; - [], "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)"; - [], "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)"; - [], "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,58--11,67)"; - [], "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,58--12,67)"; - [], "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; - [], "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,58--14,67)"; - [], "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,58--15,67)"; - [], "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,58--16,69)"; - [], "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,58--17,69)"; - [], "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,58--18,69)"; - [], "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (19,56--19,67)"; - [], "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (20,56--20,67)"; - [], "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,45--22,52)"; - [], "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; - [], "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; - [], "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; - [], "let testInt64UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; - [], "let testInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; - [], "let testInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; - [], "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; - [], "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; - [], "let testInt64ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; - [], "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; - [], "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; - [], "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; - [], "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; - [], "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; - [], "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; - [], "let testInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; - [], "let testInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; - [], "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; - [], "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; - [], "let testInt64ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; - [], "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; - [], "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; - [], "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; - [], "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; - [], "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; - [], "let testInt64ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; - [], "let testInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; - [], "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; - [], "let testInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; - [], "let testInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; - [FC47], "let testInt64ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" + [], "type OperatorTestsInt64" + [], "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,66--4,75)" + [], "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,66--5,76)" + [], "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,66--6,75)" + [], "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,66--7,76)" + [], "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,66--8,75)" + [], "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,66--9,76)" + [], "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,58--11,67)" + [], "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,58--12,67)" + [], "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,58--13,67)" + [], "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,58--14,67)" + [], "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,58--15,67)" + [], "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,58--16,69)" + [], "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,58--17,69)" + [], "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,58--18,69)" + [], "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,63)) @ (19,56--19,67)" + [], "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,63)) @ (20,56--20,67)" + [], "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,45--22,52)" + [], "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,56--24,73)" + [], "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,56--25,73)" + [], "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,56--26,73)" + [], "let testInt64UnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,45--27,60)" + [], "let testInt64ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,45--29,60)" + [], "let testInt64ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,45--30,61)" + [], "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,45--31,61)" + [], "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,45--32,62)" + [], "let testInt64ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,45--33,59)" + [], "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,45--34,61)" + [], "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,45--35,62)" + [], "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,45--36,61)" + [], "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,45--37,62)" + [], "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,45--38,65)" + [], "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,45--39,66)" + [], "let testInt64ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,45--41,52)" + [], "let testInt64ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,45--42,53)" + [], "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,45--43,53)" + [], "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,45--44,54)" + [], "let testInt64ToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,45--45,51)" + [], "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,45--46,53)" + [], "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,45--47,54)" + [], "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,45--48,53)" + [], "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,45--49,54)" + [], "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,45--50,57)" + [], "let testInt64ToUIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,45--51,58)" + [], "let testInt64ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,45--52,55)" + [], "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,45--53,53)" + [], "let testInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)" + [], "let testInt64ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,45--55,52)" + [FC47; FC50], "let testInt64ToStringOperator(e1) = IntrinsicFunctions.UnboxGeneric (Operators.Box (e1)).ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,45--56,54)" ] + testOperators "Int64" "int64" excludedTests expectedUnoptimized expectedOptimized [] @@ -1980,103 +1981,102 @@ let ``Test Operator Declarations for UInt64`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsUInt64"; - [], "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)"; - [], "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)"; - [], "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)"; - [], "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,61--12,70)"; - [], "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; - [], "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,61--14,70)"; - [], "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,61--15,70)"; - [], "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,58--19,69)"; - [], "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,58--20,69)"; - [], "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; - [], "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; - [], "let testUInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt64ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; - [], "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt64ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; - [], "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testUInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; - [], "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; - [], "let testUInt64ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [], "let testUInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + [], "type OperatorTestsUInt64" + [], "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)" + [], "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)" + [], "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)" + [], "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,61--12,70)" + [], "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,61--13,70)" + [], "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,61--14,70)" + [], "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,61--15,70)" + [], "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,58--19,69)" + [], "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,58--20,69)" + [], "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,59--25,76)" + [], "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,59--26,76)" + [], "let testUInt64ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt64ToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt64ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt64ToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt64ToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testUInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,47--52,57)" + [], "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,47--53,55)" + [], "let testUInt64ToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,47--54,57)" + [], "let testUInt64ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [], "let testUInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)" ] - let expectedOptimized = [ - [], "type OperatorTestsUInt64"; - [], "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)"; - [], "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)"; - [], "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)"; - [], "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,61--12,70)"; - [], "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; - [], "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,61--14,70)"; - [], "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,61--15,70)"; - [], "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,61--16,72)"; - [], "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,61--17,72)"; - [], "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,61--18,72)"; - [], "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (19,58--19,69)"; - [], "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (20,58--20,69)"; - [], "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; - [], "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; - [], "let testUInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testUInt64ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; - [], "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; - [], "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; - [], "let testUInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testUInt64ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; - [], "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; - [], "let testUInt64ToUInt64Operator(e1) = e1 @ (49,54--49,56)"; - [], "let testUInt64ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; - [], "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; - [], "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; - [], "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; - [], "let testUInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testUInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [FC47], "let testUInt64ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint64 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" + [], "type OperatorTestsUInt64" + [], "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,69--5,79)" + [], "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,69--7,79)" + [], "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,69--9,79)" + [], "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,61--12,70)" + [], "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,61--13,70)" + [], "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,61--14,70)" + [], "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,61--15,70)" + [], "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,61--16,72)" + [], "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,61--17,72)" + [], "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,61--18,72)" + [], "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,63)) @ (19,58--19,69)" + [], "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e2,63)) @ (20,58--20,69)" + [], "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,59--25,76)" + [], "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,59--26,76)" + [], "let testUInt64ToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testUInt64ToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,47--38,67)" + [], "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,47--39,68)" + [], "let testUInt64ToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testUInt64ToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testUInt64ToUInt64Operator(e1) = e1 @ (49,54--49,56)" + [], "let testUInt64ToIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,47--50,59)" + [], "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,47--51,60)" + [], "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,47--52,57)" + [], "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,47--53,55)" + [], "let testUInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)" + [], "let testUInt64ToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [FC47; FC50], "let testUInt64ToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.uint64 = e1 in copyOfStruct.ToString() @ (56,47--56,56)" ] testOperators "UInt64" "uint64" excludedTests expectedUnoptimized expectedOptimized @@ -2086,107 +2086,106 @@ let ``Test Operator Declarations for IntPtr`` () = let excludedTests = [ ] let expectedUnoptimized = [ - [], "type OperatorTestsIntPtr"; - [], "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,75--4,84)"; - [], "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,75--5,85)"; - [], "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,75--6,84)"; - [], "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,75--7,85)"; - [], "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,75--8,84)"; - [], "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,75--9,85)"; - [], "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,67--11,76)"; - [], "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,67--12,76)"; - [], "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,67--13,76)"; - [], "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,67--14,76)"; - [], "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,67--15,76)"; - [], "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,67--16,78)"; - [], "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,67--17,78)"; - [], "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,67--18,78)"; - [], "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,61--19,72)"; - [], "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,61--20,72)"; - [], "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,50--22,57)"; - [], "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,65--24,82)"; - [], "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,65--25,82)"; - [], "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,65--26,82)"; - [], "let testIntPtrUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,50--27,65)"; - [], "let testIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,50--29,65)"; - [], "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,50--30,66)"; - [], "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,50--31,66)"; - [], "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,50--32,67)"; - [], "let testIntPtrToIntChecked(e1) = Checked.ToInt (e1) @ (33,50--33,64)"; - [], "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,50--34,66)"; - [], "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,50--35,67)"; - [], "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,50--36,66)"; - [], "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,50--37,67)"; - [], "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,50--38,70)"; - [], "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,50--39,71)"; - [], "let testIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,50--41,57)"; - [], "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,50--42,58)"; - [], "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,50--43,58)"; - [], "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,50--44,59)"; - [], "let testIntPtrToIntOperator(e1) = Operators.ToInt (e1) @ (45,50--45,56)"; - [], "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,50--46,58)"; - [], "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,50--47,59)"; - [], "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,50--48,58)"; - [], "let testIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,50--49,59)"; - [], "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,50--50,62)"; - [], "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,50--51,63)"; - [], "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,50--52,60)"; - [], "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,50--53,58)"; - [], "let testIntPtrToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,50--54,60)"; - [], "let testIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,50--55,57)"; - [], "let testIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,50--56,59)"; + [], "type OperatorTestsIntPtr" + [], "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,75--4,84)" + [], "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,75--5,85)" + [], "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,75--6,84)" + [], "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,75--7,85)" + [], "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,75--8,84)" + [], "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,75--9,85)" + [], "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,67--11,76)" + [], "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,67--12,76)" + [], "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,67--13,76)" + [], "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,67--14,76)" + [], "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,67--15,76)" + [], "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,67--16,78)" + [], "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,67--17,78)" + [], "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,67--18,78)" + [], "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,61--19,72)" + [], "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,61--20,72)" + [], "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,50--22,57)" + [], "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,65--24,82)" + [], "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,65--25,82)" + [], "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,65--26,82)" + [], "let testIntPtrUnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,50--27,65)" + [], "let testIntPtrToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,50--29,65)" + [], "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,50--30,66)" + [], "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,50--31,66)" + [], "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,50--32,67)" + [], "let testIntPtrToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,50--33,64)" + [], "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,50--34,66)" + [], "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,50--35,67)" + [], "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,50--36,66)" + [], "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,50--37,67)" + [], "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,50--38,70)" + [], "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,50--39,71)" + [], "let testIntPtrToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,50--41,57)" + [], "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,50--42,58)" + [], "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,50--43,58)" + [], "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,50--44,59)" + [], "let testIntPtrToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,50--45,56)" + [], "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,50--46,58)" + [], "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,50--47,59)" + [], "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,50--48,58)" + [], "let testIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,50--49,59)" + [], "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,50--50,62)" + [], "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,50--51,63)" + [], "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,50--52,60)" + [], "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,50--53,58)" + [], "let testIntPtrToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,50--54,60)" + [], "let testIntPtrToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,50--55,57)" + [], "let testIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,50--56,59)" ] - let expectedOptimized = [ - [], "type OperatorTestsIntPtr"; - [], "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,75--4,84)"; - [], "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,75--5,85)"; - [], "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,75--6,84)"; - [], "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,75--7,85)"; - [], "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,75--8,84)"; - [], "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,75--9,85)"; - [], "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,67--11,76)"; - [], "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,67--12,76)"; - [], "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,67--13,76)"; - [], "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,67--14,76)"; - [], "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,67--15,76)"; - [], "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,67--16,78)"; - [], "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,67--17,78)"; - [], "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,67--18,78)"; - [], "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,61--19,72)"; - [], "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,61--20,72)"; - [], "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,50--22,57)"; - [], "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,65--24,82)"; - [], "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,65--25,82)"; - [], "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,65--26,82)"; - [], "let testIntPtrUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,50--27,65)"; - [], "let testIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,50--29,65)"; - [], "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,50--30,66)"; - [], "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,50--31,66)"; - [], "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,50--32,67)"; - [], "let testIntPtrToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,50--33,64)"; - [], "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,50--34,66)"; - [], "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,50--35,67)"; - [], "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,50--36,66)"; - [], "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,50--37,67)"; - [], "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,50--38,70)"; - [], "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,50--39,71)"; - [], "let testIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,50--41,57)"; - [], "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,50--42,58)"; - [], "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,50--43,58)"; - [], "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,50--44,59)"; - [], "let testIntPtrToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,50--45,56)"; - [], "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,50--46,58)"; - [], "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,50--47,59)"; - [], "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,50--48,58)"; - [], "let testIntPtrToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,50--49,59)"; - [], "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,50--50,62)"; - [], "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,50--51,63)"; - [], "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,50--52,60)"; - [], "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,50--53,58)"; - [], "let testIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToInt64 (e1)) @ (54,50--54,60)"; - [], "let testIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,50--55,57)"; - [FC47], "let testIntPtrToStringOperator(e1) = e1.ToString() @ (56,50--56,59)" + [], "type OperatorTestsIntPtr" + [], "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,75--4,84)" + [], "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,75--5,85)" + [], "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,75--6,84)" + [], "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,75--7,85)" + [], "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,75--8,84)" + [], "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,75--9,85)" + [], "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,67--11,76)" + [], "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,67--12,76)" + [], "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,67--13,76)" + [], "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,67--14,76)" + [], "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,67--15,76)" + [], "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,67--16,78)" + [], "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,67--17,78)" + [], "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,67--18,78)" + [], "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,61--19,72)" + [], "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,61--20,72)" + [], "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,50--22,57)" + [], "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,65--24,82)" + [], "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,65--25,82)" + [], "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,65--26,82)" + [], "let testIntPtrUnaryNegChecked(e1) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),0,e1) @ (27,50--27,65)" + [], "let testIntPtrToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,50--29,65)" + [], "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,50--30,66)" + [], "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,50--31,66)" + [], "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,50--32,67)" + [], "let testIntPtrToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,50--33,64)" + [], "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,50--34,66)" + [], "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,50--35,67)" + [], "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,50--36,66)" + [], "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,50--37,67)" + [], "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,50--38,70)" + [], "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,50--39,71)" + [], "let testIntPtrToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,50--41,57)" + [], "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,50--42,58)" + [], "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,50--43,58)" + [], "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,50--44,59)" + [], "let testIntPtrToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,50--45,56)" + [], "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,50--46,58)" + [], "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,50--47,59)" + [], "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,50--48,58)" + [], "let testIntPtrToUInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,50--49,59)" + [], "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,50--50,62)" + [], "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,50--51,63)" + [], "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,50--52,60)" + [], "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,50--53,58)" + [], "let testIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (54,50--54,60)" + [], "let testIntPtrToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,50--55,57)" + [FC47; FC50], "let testIntPtrToStringOperator(e1) = e1.ToString() @ (56,50--56,59)" ] testOperators "IntPtr" "nativeint" excludedTests expectedUnoptimized expectedOptimized @@ -2199,103 +2198,102 @@ let ``Test Operator Declarations for UIntPtr`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsUIntPtr"; - [], "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,78--4,87)"; - [], "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,78--5,88)"; - [], "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,78--6,87)"; - [], "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,78--7,88)"; - [], "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,78--8,87)"; - [], "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,78--9,88)"; - [], "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,70--11,79)"; - [], "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,70--12,79)"; - [], "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,70--13,79)"; - [], "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,70--14,79)"; - [], "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,70--15,79)"; - [], "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,70--16,81)"; - [], "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,70--17,81)"; - [], "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,70--18,81)"; - [], "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,63--19,74)"; - [], "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,63--20,74)"; - [], "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,68--24,85)"; - [], "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,68--25,85)"; - [], "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,68--26,85)"; - [], "let testUIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,52--29,67)"; - [], "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,52--30,68)"; - [], "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,52--31,68)"; - [], "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,52--32,69)"; - [], "let testUIntPtrToIntChecked(e1) = Checked.ToInt (e1) @ (33,52--33,66)"; - [], "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,52--34,68)"; - [], "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,52--35,69)"; - [], "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,52--36,68)"; - [], "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,52--37,69)"; - [], "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,52--38,72)"; - [], "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,52--39,73)"; - [], "let testUIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,52--41,59)"; - [], "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,52--42,60)"; - [], "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,52--43,60)"; - [], "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,52--44,61)"; - [], "let testUIntPtrToIntOperator(e1) = Operators.ToInt (e1) @ (45,52--45,58)"; - [], "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,52--46,60)"; - [], "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,52--47,61)"; - [], "let testUIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,52--48,60)"; - [], "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,52--49,61)"; - [], "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,52--50,64)"; - [], "let testUIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,52--51,65)"; - [], "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,52--52,62)"; - [], "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,52--53,60)"; - [], "let testUIntPtrToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,52--54,62)"; - [], "let testUIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,52--55,59)"; - [], "let testUIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,52--56,61)"; + [], "type OperatorTestsUIntPtr" + [], "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,78--4,87)" + [], "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,78--5,88)" + [], "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,78--6,87)" + [], "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,78--7,88)" + [], "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,78--8,87)" + [], "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,78--9,88)" + [], "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,70--11,79)" + [], "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,70--12,79)" + [], "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,70--13,79)" + [], "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,70--14,79)" + [], "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,70--15,79)" + [], "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,70--16,81)" + [], "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,70--17,81)" + [], "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,70--18,81)" + [], "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,63--19,74)" + [], "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,63--20,74)" + [], "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,68--24,85)" + [], "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,68--25,85)" + [], "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,68--26,85)" + [], "let testUIntPtrToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,52--29,67)" + [], "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,52--30,68)" + [], "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,52--31,68)" + [], "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,52--32,69)" + [], "let testUIntPtrToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,52--33,66)" + [], "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,52--34,68)" + [], "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,52--35,69)" + [], "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,52--36,68)" + [], "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,52--37,69)" + [], "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,52--38,72)" + [], "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,52--39,73)" + [], "let testUIntPtrToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,52--41,59)" + [], "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,52--42,60)" + [], "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,52--43,60)" + [], "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,52--44,61)" + [], "let testUIntPtrToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,52--45,58)" + [], "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,52--46,60)" + [], "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,52--47,61)" + [], "let testUIntPtrToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,52--48,60)" + [], "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,52--49,61)" + [], "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,52--50,64)" + [], "let testUIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,52--51,65)" + [], "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,52--52,62)" + [], "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,52--53,60)" + [], "let testUIntPtrToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,52--54,62)" + [], "let testUIntPtrToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,52--55,59)" + [], "let testUIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,52--56,61)" ] - let expectedOptimized = [ - [], "type OperatorTestsUIntPtr"; - [], "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,78--4,87)"; - [], "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,78--5,88)"; - [], "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,78--6,87)"; - [], "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,78--7,88)"; - [], "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,78--8,87)"; - [], "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,78--9,88)"; - [], "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,70--11,79)"; - [], "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,70--12,79)"; - [], "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,70--13,79)"; - [], "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,70--14,79)"; - [], "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,70--15,79)"; - [], "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,70--16,81)"; - [], "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,70--17,81)"; - [], "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,70--18,81)"; - [], "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,63--19,74)"; - [], "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,63--20,74)"; - [], "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,68--24,85)"; - [], "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,68--25,85)"; - [], "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,68--26,85)"; - [], "let testUIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,52--29,67)"; - [], "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,52--30,68)"; - [], "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,52--31,68)"; - [], "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,52--32,69)"; - [], "let testUIntPtrToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,52--33,66)"; - [], "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,52--34,68)"; - [], "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,52--35,69)"; - [], "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,52--36,68)"; - [], "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,52--37,69)"; - [], "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,52--38,72)"; - [], "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,52--39,73)"; - [], "let testUIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,52--41,59)"; - [], "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,52--42,60)"; - [], "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,52--43,60)"; - [], "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,52--44,61)"; - [], "let testUIntPtrToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,52--45,58)"; - [], "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,52--46,60)"; - [], "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,52--47,61)"; - [], "let testUIntPtrToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,52--48,60)"; - [], "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,52--49,61)"; - [], "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,52--50,64)"; - [], "let testUIntPtrToUIntPtrOperator(e1) = e1 @ (51,63--51,65)"; - [], "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,52--52,62)"; - [], "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,52--53,60)"; - [], "let testUIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToUInt64 (e1)) @ (54,52--54,62)"; - [], "let testUIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,52--55,59)"; - [FC47], "let testUIntPtrToStringOperator(e1) = e1.ToString() @ (56,52--56,61)" + [], "type OperatorTestsUIntPtr" + [], "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,78--4,87)" + [], "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,78--5,88)" + [], "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,78--6,87)" + [], "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,78--7,88)" + [], "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,78--8,87)" + [], "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,78--9,88)" + [], "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,70--11,79)" + [], "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,70--12,79)" + [], "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,70--13,79)" + [], "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,70--14,79)" + [], "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,70--15,79)" + [], "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseAndDynamic (arg0_0,arg1_0),e1,e2) @ (16,70--16,81)" + [], "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.BitwiseOrDynamic (arg0_0,arg1_0),e1,e2) @ (17,70--17,81)" + [], "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ExclusiveOrDynamic (arg0_0,arg1_0),e1,e2) @ (18,70--18,81)" + [], "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.LeftShiftDynamic (arg0_0,arg1_0),e1,e2) @ (19,63--19,74)" + [], "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.RightShiftDynamic (arg0_0,arg1_0),e1,e2) @ (20,63--20,74)" + [], "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,68--24,85)" + [], "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,68--25,85)" + [], "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,68--26,85)" + [], "let testUIntPtrToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,52--29,67)" + [], "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,52--30,68)" + [], "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,52--31,68)" + [], "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,52--32,69)" + [], "let testUIntPtrToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,52--33,66)" + [], "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,52--34,68)" + [], "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,52--35,69)" + [], "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,52--36,68)" + [], "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,52--37,69)" + [], "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,52--38,72)" + [], "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,52--39,73)" + [], "let testUIntPtrToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,52--41,59)" + [], "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,52--42,60)" + [], "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,52--43,60)" + [], "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,52--44,61)" + [], "let testUIntPtrToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,52--45,58)" + [], "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,52--46,60)" + [], "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,52--47,61)" + [], "let testUIntPtrToInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,52--48,60)" + [], "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,52--49,61)" + [], "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,52--50,64)" + [], "let testUIntPtrToUIntPtrOperator(e1) = e1 @ (51,63--51,65)" + [], "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,52--52,62)" + [], "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,52--53,60)" + [], "let testUIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (54,52--54,62)" + [], "let testUIntPtrToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,52--55,59)" + [FC47; FC50], "let testUIntPtrToStringOperator(e1) = e1.ToString() @ (56,52--56,61)" ] testOperators "UIntPtr" "unativeint" excludedTests expectedUnoptimized expectedOptimized @@ -2311,97 +2309,96 @@ let ``Test Operator Declarations for Single`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsSingle"; - [], "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,71--4,80)"; - [], "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,71--5,81)"; - [], "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,71--6,80)"; - [], "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,71--7,81)"; - [], "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,71--8,80)"; - [], "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,71--9,81)"; - [], "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,63--11,72)"; - [], "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,63--12,72)"; - [], "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,63--13,72)"; - [], "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,63--14,72)"; - [], "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,63--15,72)"; - [], "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,48--22,55)"; - [], "let testSingleAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,61--24,78)"; - [], "let testSingleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,61--25,78)"; - [], "let testSingleMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,61--26,78)"; - [], "let testSingleUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,48--27,63)"; - [], "let testSingleToByteChecked(e1) = Checked.ToByte (e1) @ (29,48--29,63)"; - [], "let testSingleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,48--30,64)"; - [], "let testSingleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,48--31,64)"; - [], "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,48--32,65)"; - [], "let testSingleToIntChecked(e1) = Checked.ToInt (e1) @ (33,48--33,62)"; - [], "let testSingleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,48--34,64)"; - [], "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,48--35,65)"; - [], "let testSingleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,48--36,64)"; - [], "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,48--37,65)"; - [], "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,48--38,68)"; - [], "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,48--39,69)"; - [], "let testSingleToByteOperator(e1) = Operators.ToByte (e1) @ (41,48--41,55)"; - [], "let testSingleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,48--42,56)"; - [], "let testSingleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,48--43,56)"; - [], "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,48--44,57)"; - [], "let testSingleToIntOperator(e1) = Operators.ToInt (e1) @ (45,48--45,54)"; - [], "let testSingleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,48--46,56)"; - [], "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,48--47,57)"; - [], "let testSingleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,48--48,56)"; - [], "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,48--49,57)"; - [], "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,48--50,60)"; - [], "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,48--51,61)"; - [], "let testSingleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,48--52,58)"; - [], "let testSingleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,48--53,56)"; - [], "let testSingleToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,48--54,58)"; - [], "let testSingleToCharOperator(e1) = Operators.ToChar (e1) @ (55,48--55,55)"; - [], "let testSingleToStringOperator(e1) = Operators.ToString (e1) @ (56,48--56,57)"; + [], "type OperatorTestsSingle" + [], "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,71--4,80)" + [], "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,71--5,81)" + [], "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,71--6,80)" + [], "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,71--7,81)" + [], "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,71--8,80)" + [], "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,71--9,81)" + [], "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,63--11,72)" + [], "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,63--12,72)" + [], "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,63--13,72)" + [], "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,63--14,72)" + [], "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,63--15,72)" + [], "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,48--22,55)" + [], "let testSingleAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,61--24,78)" + [], "let testSingleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,61--25,78)" + [], "let testSingleMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,61--26,78)" + [], "let testSingleUnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,48--27,63)" + [], "let testSingleToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,48--29,63)" + [], "let testSingleToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,48--30,64)" + [], "let testSingleToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,48--31,64)" + [], "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,48--32,65)" + [], "let testSingleToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,48--33,62)" + [], "let testSingleToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,48--34,64)" + [], "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,48--35,65)" + [], "let testSingleToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,48--36,64)" + [], "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,48--37,65)" + [], "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,48--38,68)" + [], "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,48--39,69)" + [], "let testSingleToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,48--41,55)" + [], "let testSingleToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,48--42,56)" + [], "let testSingleToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,48--43,56)" + [], "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,48--44,57)" + [], "let testSingleToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,48--45,54)" + [], "let testSingleToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,48--46,56)" + [], "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,48--47,57)" + [], "let testSingleToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,48--48,56)" + [], "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,48--49,57)" + [], "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,48--50,60)" + [], "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,48--51,61)" + [], "let testSingleToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,48--52,58)" + [], "let testSingleToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,48--53,56)" + [], "let testSingleToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,48--54,58)" + [], "let testSingleToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,48--55,55)" + [], "let testSingleToStringOperator(e1) = Operators.ToString (e1) @ (56,48--56,57)" ] - let expectedOptimized = [ - [], "type OperatorTestsSingle"; - [], "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,71--4,80)"; - [], "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,71--5,81)"; - [], "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,71--6,80)"; - [], "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,71--7,81)"; - [], "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,71--8,80)"; - [], "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,71--9,81)"; - [], "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,63--11,72)"; - [], "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,63--12,72)"; - [], "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,63--13,72)"; - [], "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,63--14,72)"; - [], "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,63--15,72)"; - [], "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,48--22,55)"; - [], "let testSingleAdditionChecked(e1) (e2) = Operators.op_Addition (e1,e2) @ (24,61--24,78)"; - [], "let testSingleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (25,61--25,78)"; - [], "let testSingleMultiplyChecked(e1) (e2) = Operators.op_Multiply (e1,e2) @ (26,61--26,78)"; - [], "let testSingleUnaryNegChecked(e1) = Operators.op_UnaryNegation (e1) @ (27,48--27,63)"; - [], "let testSingleToByteChecked(e1) = Checked.ToByte (e1) @ (29,48--29,63)"; - [], "let testSingleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,48--30,64)"; - [], "let testSingleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,48--31,64)"; - [], "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,48--32,65)"; - [], "let testSingleToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,48--33,62)"; - [], "let testSingleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,48--34,64)"; - [], "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,48--35,65)"; - [], "let testSingleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,48--36,64)"; - [], "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,48--37,65)"; - [], "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,48--38,68)"; - [], "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,48--39,69)"; - [], "let testSingleToByteOperator(e1) = Operators.ToByte (e1) @ (41,48--41,55)"; - [], "let testSingleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,48--42,56)"; - [], "let testSingleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,48--43,56)"; - [], "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,48--44,57)"; - [], "let testSingleToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,48--45,54)"; - [], "let testSingleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,48--46,56)"; - [], "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,48--47,57)"; - [], "let testSingleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,48--48,56)"; - [], "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,48--49,57)"; - [], "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,48--50,60)"; - [], "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,48--51,61)"; - [], "let testSingleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,48--52,58)"; - [], "let testSingleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,48--53,56)"; - [], "let testSingleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,48--54,58)"; - [], "let testSingleToCharOperator(e1) = Operators.ToChar (e1) @ (55,48--55,55)"; - [FC47], "let testSingleToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,48--56,57)" + [], "type OperatorTestsSingle" + [], "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,71--4,80)" + [], "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,71--5,81)" + [], "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,71--6,80)" + [], "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,71--7,81)" + [], "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,71--8,80)" + [], "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,71--9,81)" + [], "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,63--11,72)" + [], "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,63--12,72)" + [], "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,63--13,72)" + [], "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,63--14,72)" + [], "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,63--15,72)" + [], "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,48--22,55)" + [], "let testSingleAdditionChecked(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,61--24,78)" + [], "let testSingleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,61--25,78)" + [], "let testSingleMultiplyChecked(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,61--26,78)" + [], "let testSingleUnaryNegChecked(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,48--27,63)" + [], "let testSingleToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,48--29,63)" + [], "let testSingleToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,48--30,64)" + [], "let testSingleToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,48--31,64)" + [], "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,48--32,65)" + [], "let testSingleToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,48--33,62)" + [], "let testSingleToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,48--34,64)" + [], "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,48--35,65)" + [], "let testSingleToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,48--36,64)" + [], "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,48--37,65)" + [], "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,48--38,68)" + [], "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,48--39,69)" + [], "let testSingleToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,48--41,55)" + [], "let testSingleToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,48--42,56)" + [], "let testSingleToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,48--43,56)" + [], "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,48--44,57)" + [], "let testSingleToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,48--45,54)" + [], "let testSingleToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,48--46,56)" + [], "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,48--47,57)" + [], "let testSingleToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,48--48,56)" + [], "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,48--49,57)" + [], "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,48--50,60)" + [], "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,48--51,61)" + [], "let testSingleToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,48--52,58)" + [], "let testSingleToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,48--53,56)" + [], "let testSingleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,48--54,58)" + [], "let testSingleToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,48--55,55)" + [FC47; FC50], "let testSingleToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,48--56,57)" ] testOperators "Single" "float32" excludedTests expectedUnoptimized expectedOptimized @@ -2417,99 +2414,99 @@ let ``Test Operator Declarations for Double`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsDouble"; - [], "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,76)"; - [], "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,77)"; - [], "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,76)"; - [], "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,77)"; - [], "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,76)"; - [], "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,77)"; - [], "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,68)"; - [], "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,68)"; - [], "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,59--13,68)"; - [], "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,68)"; - [], "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,68)"; - [], "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,53)"; - [], "let testDoubleAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,57--24,74)"; - [], "let testDoubleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,57--25,74)"; - [], "let testDoubleMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,57--26,74)"; - [], "let testDoubleUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,46--27,61)"; - [], "let testDoubleToByteChecked(e1) = Checked.ToByte (e1) @ (29,46--29,61)"; - [], "let testDoubleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,46--30,62)"; - [], "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,46--31,62)"; - [], "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,46--32,63)"; - [], "let testDoubleToIntChecked(e1) = Checked.ToInt (e1) @ (33,46--33,60)"; - [], "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,46--34,62)"; - [], "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,46--35,63)"; - [], "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,46--36,62)"; - [], "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,46--37,63)"; - [], "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,46--38,66)"; - [], "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,46--39,67)"; - [], "let testDoubleToByteOperator(e1) = Operators.ToByte (e1) @ (41,46--41,53)"; - [], "let testDoubleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,46--42,54)"; - [], "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,46--43,54)"; - [], "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,46--44,55)"; - [], "let testDoubleToIntOperator(e1) = Operators.ToInt (e1) @ (45,46--45,52)"; - [], "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,46--46,54)"; - [], "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,46--47,55)"; - [], "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,46--48,54)"; - [], "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,46--49,55)"; - [], "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,46--50,58)"; - [], "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,46--51,59)"; - [], "let testDoubleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,46--52,56)"; - [], "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,46--53,54)"; - [], "let testDoubleToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,46--54,56)"; - [], "let testDoubleToCharOperator(e1) = Operators.ToChar (e1) @ (55,46--55,53)"; - [], "let testDoubleToStringOperator(e1) = Operators.ToString (e1) @ (56,46--56,55)"; + [], "type OperatorTestsDouble" + [], "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,76)" + [], "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,77)" + [], "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,76)" + [], "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,77)" + [], "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,76)" + [], "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,77)" + [], "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,59--11,68)" + [], "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,59--12,68)" + [], "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,59--13,68)" + [], "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,59--14,68)" + [], "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,59--15,68)" + [], "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,46--22,53)" + [], "let testDoubleAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,57--24,74)" + [], "let testDoubleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,57--25,74)" + [], "let testDoubleMultiplyChecked(e1) (e2) = Checked.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,57--26,74)" + [], "let testDoubleUnaryNegChecked(e1) = Checked.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,46--27,61)" + [], "let testDoubleToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,46--29,61)" + [], "let testDoubleToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,46--30,62)" + [], "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,46--31,62)" + [], "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,46--32,63)" + [], "let testDoubleToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,46--33,60)" + [], "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,46--34,62)" + [], "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,46--35,63)" + [], "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,46--36,62)" + [], "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,46--37,63)" + [], "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,46--38,66)" + [], "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,46--39,67)" + [], "let testDoubleToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,46--41,53)" + [], "let testDoubleToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,46--42,54)" + [], "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,46--43,54)" + [], "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,46--44,55)" + [], "let testDoubleToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,46--45,52)" + [], "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,46--46,54)" + [], "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,46--47,55)" + [], "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,46--48,54)" + [], "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,46--49,55)" + [], "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,46--50,58)" + [], "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,46--51,59)" + [], "let testDoubleToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,46--52,56)" + [], "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,46--53,54)" + [], "let testDoubleToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,46--54,56)" + [], "let testDoubleToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,46--55,53)" + [], "let testDoubleToStringOperator(e1) = Operators.ToString (e1) @ (56,46--56,55)" ] - let expectedOptimized = [ - [], "type OperatorTestsDouble"; - [], "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,76)"; - [], "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,77)"; - [], "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,76)"; - [], "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,77)"; - [], "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,76)"; - [], "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,77)"; - [], "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,68)"; - [], "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,68)"; - [], "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,59--13,68)"; - [], "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,68)"; - [], "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,68)"; - [], "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,53)"; - [], "let testDoubleAdditionChecked(e1) (e2) = Operators.op_Addition (e1,e2) @ (24,57--24,74)"; - [], "let testDoubleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (25,57--25,74)"; - [], "let testDoubleMultiplyChecked(e1) (e2) = Operators.op_Multiply (e1,e2) @ (26,57--26,74)"; - [], "let testDoubleUnaryNegChecked(e1) = Operators.op_UnaryNegation (e1) @ (27,46--27,61)"; - [], "let testDoubleToByteChecked(e1) = Checked.ToByte (e1) @ (29,46--29,61)"; - [], "let testDoubleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,46--30,62)"; - [], "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,46--31,62)"; - [], "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,46--32,63)"; - [], "let testDoubleToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,46--33,60)"; - [], "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,46--34,62)"; - [], "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,46--35,63)"; - [], "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,46--36,62)"; - [], "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,46--37,63)"; - [], "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,46--38,66)"; - [], "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,46--39,67)"; - [], "let testDoubleToByteOperator(e1) = Operators.ToByte (e1) @ (41,46--41,53)"; - [], "let testDoubleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,46--42,54)"; - [], "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,46--43,54)"; - [], "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,46--44,55)"; - [], "let testDoubleToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,46--45,52)"; - [], "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,46--46,54)"; - [], "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,46--47,55)"; - [], "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,46--48,54)"; - [], "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,46--49,55)"; - [], "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,46--50,58)"; - [], "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,46--51,59)"; - [], "let testDoubleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,46--52,56)"; - [], "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,46--53,54)"; - [], "let testDoubleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,46--54,56)"; - [], "let testDoubleToCharOperator(e1) = Operators.ToChar (e1) @ (55,46--55,53)"; - [FC47], "let testDoubleToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,46--56,55)" + [], "type OperatorTestsDouble" + [], "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,76)" + [], "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,77)" + [], "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,76)" + [], "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,77)" + [], "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,76)" + [], "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,77)" + [], "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,59--11,68)" + [], "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (12,59--12,68)" + [], "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (13,59--13,68)" + [], "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),e1,e2) @ (14,59--14,68)" + [], "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.ModulusDynamic (arg0_0,arg1_0),e1,e2) @ (15,59--15,68)" + [], "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (22,46--22,53)" + [], "let testDoubleAdditionChecked(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,57--24,74)" + [], "let testDoubleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.SubtractionDynamic (arg0_0,arg1_0),e1,e2) @ (25,57--25,74)" + [], "let testDoubleMultiplyChecked(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.MultiplyDynamic (arg0_0,arg1_0),e1,e2) @ (26,57--26,74)" + [], "let testDoubleUnaryNegChecked(e1) = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),e1) @ (27,46--27,61)" + [], "let testDoubleToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,46--29,61)" + [], "let testDoubleToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,46--30,62)" + [], "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,46--31,62)" + [], "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,46--32,63)" + [], "let testDoubleToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,46--33,60)" + [], "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,46--34,62)" + [], "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,46--35,63)" + [], "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,46--36,62)" + [], "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,46--37,63)" + [], "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,46--38,66)" + [], "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,46--39,67)" + [], "let testDoubleToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,46--41,53)" + [], "let testDoubleToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,46--42,54)" + [], "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,46--43,54)" + [], "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,46--44,55)" + [], "let testDoubleToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,46--45,52)" + [], "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,46--46,54)" + [], "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,46--47,55)" + [], "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,46--48,54)" + [], "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,46--49,55)" + [], "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,46--50,58)" + [], "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,46--51,59)" + [], "let testDoubleToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,46--52,56)" + [], "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,46--53,54)" + [], "let testDoubleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,46--54,56)" + [], "let testDoubleToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,46--55,53)" + [FC47; FC50], "let testDoubleToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,46--56,55)" ] + testOperators "Double" "float" excludedTests expectedUnoptimized expectedOptimized [] @@ -2531,83 +2528,83 @@ let ``Test Operator Declarations for Decimal`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsDecimal"; - [], "let testDecimalEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,72--4,81)"; - [], "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,72--5,82)"; - [], "let testDecimalLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,72--6,81)"; - [], "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,72--7,82)"; - [], "let testDecimalGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,72--8,81)"; - [], "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,72--9,82)"; - [], "let testDecimalAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,64--11,73)"; - [], "let testDecimalSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,64--12,73)"; - [], "let testDecimalMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,64--13,73)"; - [], "let testDecimalDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,64--14,73)"; - [], "let testDecimalModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,64--15,73)"; - [], "let testDecimalAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,62--24,79)"; - [], "let testDecimalToByteChecked(e1) = Checked.ToByte (e1) @ (29,49--29,64)"; - [], "let testDecimalToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,49--30,65)"; - [], "let testDecimalToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,49--31,65)"; - [], "let testDecimalToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,49--32,66)"; - [], "let testDecimalToIntChecked(e1) = Checked.ToInt (e1) @ (33,49--33,63)"; - [], "let testDecimalToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,49--34,65)"; - [], "let testDecimalToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,49--35,66)"; - [], "let testDecimalToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,49--36,65)"; - [], "let testDecimalToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,49--37,66)"; - [], "let testDecimalToByteOperator(e1) = Operators.ToByte (e1) @ (41,49--41,56)"; - [], "let testDecimalToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,49--42,57)"; - [], "let testDecimalToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,49--43,57)"; - [], "let testDecimalToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,49--44,58)"; - [], "let testDecimalToIntOperator(e1) = Operators.ToInt (e1) @ (45,49--45,55)"; - [], "let testDecimalToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,49--46,57)"; - [], "let testDecimalToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,49--47,58)"; - [], "let testDecimalToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,49--48,57)"; - [], "let testDecimalToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,49--49,58)"; - [], "let testDecimalToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,49--52,59)"; - [], "let testDecimalToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,49--53,57)"; - [], "let testDecimalToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,49--54,59)"; - [], "let testDecimalToCharOperator(e1) = Operators.ToChar (e1) @ (55,49--55,56)"; - [], "let testDecimalToStringOperator(e1) = Operators.ToString (e1) @ (56,49--56,58)"; + [], "type OperatorTestsDecimal" + [], "let testDecimalEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,72--4,81)" + [], "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,72--5,82)" + [], "let testDecimalLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,72--6,81)" + [], "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,72--7,82)" + [], "let testDecimalGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,72--8,81)" + [], "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,72--9,82)" + [], "let testDecimalAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> Decimal.op_Addition (arg0_0,arg1_0),e1,e2) @ (11,64--11,73)" + [], "let testDecimalSubtractionOperator(e1) (e2) = Operators.op_Subtraction (fun arg0_0 -> fun arg1_0 -> Decimal.op_Subtraction (arg0_0,arg1_0),e1,e2) @ (12,64--12,73)" + [], "let testDecimalMultiplyOperator(e1) (e2) = Operators.op_Multiply (fun arg0_0 -> fun arg1_0 -> Decimal.op_Multiply (arg0_0,arg1_0),e1,e2) @ (13,64--13,73)" + [], "let testDecimalDivisionOperator(e1) (e2) = Operators.op_Division (fun arg0_0 -> fun arg1_0 -> Decimal.op_Division (arg0_0,arg1_0),e1,e2) @ (14,64--14,73)" + [], "let testDecimalModulusOperator(e1) (e2) = Operators.op_Modulus (fun arg0_0 -> fun arg1_0 -> Decimal.op_Modulus (arg0_0,arg1_0),e1,e2) @ (15,64--15,73)" + [], "let testDecimalAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> Decimal.op_Addition (arg0_0,arg1_0),e1,e2) @ (24,62--24,79)" + [], "let testDecimalToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (29,49--29,64)" + [], "let testDecimalToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (30,49--30,65)" + [], "let testDecimalToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (31,49--31,65)" + [], "let testDecimalToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (32,49--32,66)" + [], "let testDecimalToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (33,49--33,63)" + [], "let testDecimalToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (34,49--34,65)" + [], "let testDecimalToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (35,49--35,66)" + [], "let testDecimalToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (36,49--36,65)" + [], "let testDecimalToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (37,49--37,66)" + [], "let testDecimalToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (41,49--41,56)" + [], "let testDecimalToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (42,49--42,57)" + [], "let testDecimalToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (43,49--43,57)" + [], "let testDecimalToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (44,49--44,58)" + [], "let testDecimalToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (45,49--45,55)" + [], "let testDecimalToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (46,49--46,57)" + [], "let testDecimalToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (47,49--47,58)" + [], "let testDecimalToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (48,49--48,57)" + [], "let testDecimalToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (49,49--49,58)" + [], "let testDecimalToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (52,49--52,59)" + [], "let testDecimalToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (53,49--53,57)" + [], "let testDecimalToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,49--54,59)" + [], "let testDecimalToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> Decimal.op_Explicit (arg0_0),e1) @ (55,49--55,56)" + [], "let testDecimalToStringOperator(e1) = Operators.ToString (e1) @ (56,49--56,58)" ] - let expectedOptimized = [ - [], "type OperatorTestsDecimal"; - [], "let testDecimalEqualsOperator(e1) (e2) = Decimal.op_Equality (e1,e2) @ (4,72--4,81)"; - [], "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Equality (Decimal.op_Equality (e1,e2),False) @ (5,72--5,82)"; - [], "let testDecimalLessThanOperator(e1) (e2) = Decimal.op_LessThan (e1,e2) @ (6,72--6,81)"; - [], "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Decimal.op_LessThanOrEqual (e1,e2) @ (7,72--7,82)"; - [], "let testDecimalGreaterThanOperator(e1) (e2) = Decimal.op_GreaterThan (e1,e2) @ (8,72--8,81)"; - [], "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Decimal.op_GreaterThanOrEqual (e1,e2) @ (9,72--9,82)"; - [], "let testDecimalAdditionOperator(e1) (e2) = Decimal.op_Addition (e1,e2) @ (11,64--11,73)"; - [], "let testDecimalSubtractionOperator(e1) (e2) = Decimal.op_Subtraction (e1,e2) @ (12,64--12,73)"; - [], "let testDecimalMultiplyOperator(e1) (e2) = Decimal.op_Multiply (e1,e2) @ (13,64--13,73)"; - [], "let testDecimalDivisionOperator(e1) (e2) = Decimal.op_Division (e1,e2) @ (14,64--14,73)"; - [], "let testDecimalModulusOperator(e1) (e2) = Decimal.op_Modulus (e1,e2) @ (15,64--15,73)"; - [], "let testDecimalAdditionChecked(e1) (e2) = Decimal.op_Addition (e1,e2) @ (24,62--24,79)"; - [], "let testDecimalToByteChecked(e1) = Decimal.op_Explicit (e1) @ (29,49--29,64)"; - [], "let testDecimalToSByteChecked(e1) = Decimal.op_Explicit (e1) @ (30,49--30,65)"; - [], "let testDecimalToInt16Checked(e1) = Decimal.op_Explicit (e1) @ (31,49--31,65)"; - [], "let testDecimalToUInt16Checked(e1) = Decimal.op_Explicit (e1) @ (32,49--32,66)"; - [], "let testDecimalToIntChecked(e1) = Decimal.op_Explicit (e1) @ (33,49--33,63)"; - [], "let testDecimalToInt32Checked(e1) = Decimal.op_Explicit (e1) @ (34,49--34,65)"; - [], "let testDecimalToUInt32Checked(e1) = Decimal.op_Explicit (e1) @ (35,49--35,66)"; - [], "let testDecimalToInt64Checked(e1) = Decimal.op_Explicit (e1) @ (36,49--36,65)"; - [], "let testDecimalToUInt64Checked(e1) = Decimal.op_Explicit (e1) @ (37,49--37,66)"; - [], "let testDecimalToByteOperator(e1) = Decimal.op_Explicit (e1) @ (41,49--41,56)"; - [], "let testDecimalToSByteOperator(e1) = Decimal.op_Explicit (e1) @ (42,49--42,57)"; - [], "let testDecimalToInt16Operator(e1) = Decimal.op_Explicit (e1) @ (43,49--43,57)"; - [], "let testDecimalToUInt16Operator(e1) = Decimal.op_Explicit (e1) @ (44,49--44,58)"; - [], "let testDecimalToIntOperator(e1) = Decimal.op_Explicit (e1) @ (45,49--45,55)"; - [], "let testDecimalToInt32Operator(e1) = Decimal.op_Explicit (e1) @ (46,49--46,57)"; - [], "let testDecimalToUInt32Operator(e1) = Decimal.op_Explicit (e1) @ (47,49--47,58)"; - [], "let testDecimalToInt64Operator(e1) = Decimal.op_Explicit (e1) @ (48,49--48,57)"; - [], "let testDecimalToUInt64Operator(e1) = Decimal.op_Explicit (e1) @ (49,49--49,58)"; - [], "let testDecimalToSingleOperator(e1) = Decimal.op_Explicit (e1) @ (52,49--52,59)"; - [], "let testDecimalToDoubleOperator(e1) = Convert.ToDouble (e1) @ (53,49--53,57)"; - [], "let testDecimalToDecimalOperator(e1) = e1 @ (54,57--54,59)"; - [], "let testDecimalToCharOperator(e1) = Decimal.op_Explicit (e1) @ (55,49--55,56)"; - [FC47], "let testDecimalToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,49--56,58)" + [], "type OperatorTestsDecimal" + [], "let testDecimalEqualsOperator(e1) (e2) = Decimal.op_Equality (e1,e2) @ (4,72--4,81)" + [], "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Equality (Decimal.op_Equality (e1,e2),False) @ (5,72--5,82)" + [], "let testDecimalLessThanOperator(e1) (e2) = Decimal.op_LessThan (e1,e2) @ (6,72--6,81)" + [], "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Decimal.op_LessThanOrEqual (e1,e2) @ (7,72--7,82)" + [], "let testDecimalGreaterThanOperator(e1) (e2) = Decimal.op_GreaterThan (e1,e2) @ (8,72--8,81)" + [], "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Decimal.op_GreaterThanOrEqual (e1,e2) @ (9,72--9,82)" + [], "let testDecimalAdditionOperator(e1) (e2) = Decimal.op_Addition (e1,e2) @ (11,64--11,73)" + [], "let testDecimalSubtractionOperator(e1) (e2) = Decimal.op_Subtraction (e1,e2) @ (12,64--12,73)" + [], "let testDecimalMultiplyOperator(e1) (e2) = Decimal.op_Multiply (e1,e2) @ (13,64--13,73)" + [], "let testDecimalDivisionOperator(e1) (e2) = Decimal.op_Division (e1,e2) @ (14,64--14,73)" + [], "let testDecimalModulusOperator(e1) (e2) = Decimal.op_Modulus (e1,e2) @ (15,64--15,73)" + [], "let testDecimalAdditionChecked(e1) (e2) = Decimal.op_Addition (e1,e2) @ (24,62--24,79)" + [], "let testDecimalToByteChecked(e1) = Decimal.op_Explicit (e1) @ (29,49--29,64)" + [], "let testDecimalToSByteChecked(e1) = Decimal.op_Explicit (e1) @ (30,49--30,65)" + [], "let testDecimalToInt16Checked(e1) = Decimal.op_Explicit (e1) @ (31,49--31,65)" + [], "let testDecimalToUInt16Checked(e1) = Decimal.op_Explicit (e1) @ (32,49--32,66)" + [], "let testDecimalToIntChecked(e1) = Decimal.op_Explicit (e1) @ (33,49--33,63)" + [], "let testDecimalToInt32Checked(e1) = Decimal.op_Explicit (e1) @ (34,49--34,65)" + [], "let testDecimalToUInt32Checked(e1) = Decimal.op_Explicit (e1) @ (35,49--35,66)" + [], "let testDecimalToInt64Checked(e1) = Decimal.op_Explicit (e1) @ (36,49--36,65)" + [], "let testDecimalToUInt64Checked(e1) = Decimal.op_Explicit (e1) @ (37,49--37,66)" + [], "let testDecimalToByteOperator(e1) = Decimal.op_Explicit (e1) @ (41,49--41,56)" + [], "let testDecimalToSByteOperator(e1) = Decimal.op_Explicit (e1) @ (42,49--42,57)" + [], "let testDecimalToInt16Operator(e1) = Decimal.op_Explicit (e1) @ (43,49--43,57)" + [], "let testDecimalToUInt16Operator(e1) = Decimal.op_Explicit (e1) @ (44,49--44,58)" + [], "let testDecimalToIntOperator(e1) = Decimal.op_Explicit (e1) @ (45,49--45,55)" + [], "let testDecimalToInt32Operator(e1) = Decimal.op_Explicit (e1) @ (46,49--46,57)" + [], "let testDecimalToUInt32Operator(e1) = Decimal.op_Explicit (e1) @ (47,49--47,58)" + [], "let testDecimalToInt64Operator(e1) = Decimal.op_Explicit (e1) @ (48,49--48,57)" + [], "let testDecimalToUInt64Operator(e1) = Decimal.op_Explicit (e1) @ (49,49--49,58)" + [], "let testDecimalToSingleOperator(e1) = Decimal.op_Explicit (e1) @ (52,49--52,59)" + [], "let testDecimalToDoubleOperator(e1) = Convert.ToDouble (e1) @ (53,49--53,57)" + [], "let testDecimalToDecimalOperator(e1) = e1 @ (54,57--54,59)" + [], "let testDecimalToCharOperator(e1) = Decimal.op_Explicit (e1) @ (55,49--55,56)" + [FC47; FC50], "let testDecimalToStringOperator(e1) = e1.ToString(dflt,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (56,49--56,58)" ] + testOperators "Decimal" "decimal" excludedTests expectedUnoptimized expectedOptimized [] @@ -2630,81 +2627,81 @@ let ``Test Operator Declarations for Char`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsChar"; - [], "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)"; - [], "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,63--5,73)"; - [], "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)"; - [], "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,63--7,73)"; - [], "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)"; - [], "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,63--9,73)"; - [], "let testCharAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,55--11,64)"; - [], "let testCharAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,53--24,70)"; - [], "let testCharToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; - [], "let testCharToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; - [], "let testCharToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; - [], "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; - [], "let testCharToIntChecked(e1) = Checked.ToInt (e1) @ (33,43--33,57)"; - [], "let testCharToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; - [], "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; - [], "let testCharToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; - [], "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; - [], "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; - [], "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; - [], "let testCharToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; - [], "let testCharToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; - [], "let testCharToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; - [], "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; - [], "let testCharToIntOperator(e1) = Operators.ToInt (e1) @ (45,43--45,49)"; - [], "let testCharToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; - [], "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; - [], "let testCharToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,43--48,51)"; - [], "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; - [], "let testCharToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; - [], "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; - [], "let testCharToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,43--52,53)"; - [], "let testCharToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,43--53,51)"; - [], "let testCharToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; - [], "let testCharToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)"; + [], "type OperatorTestsChar" + [], "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)" + [], "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,63--5,73)" + [], "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)" + [], "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,63--7,73)" + [], "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)" + [], "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,63--9,73)" + [], "let testCharAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,55--11,64)" + [], "let testCharAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,53--24,70)" + [], "let testCharToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,43--29,58)" + [], "let testCharToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,43--30,59)" + [], "let testCharToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,43--31,59)" + [], "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,43--32,60)" + [], "let testCharToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,43--33,57)" + [], "let testCharToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,43--34,59)" + [], "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,43--35,60)" + [], "let testCharToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,43--36,59)" + [], "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,43--37,60)" + [], "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,43--38,63)" + [], "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,43--39,64)" + [], "let testCharToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,43--41,50)" + [], "let testCharToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,43--42,51)" + [], "let testCharToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,43--43,51)" + [], "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,43--44,52)" + [], "let testCharToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,43--45,49)" + [], "let testCharToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,43--46,51)" + [], "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,43--47,52)" + [], "let testCharToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,43--48,51)" + [], "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,43--49,52)" + [], "let testCharToIntPtrOperator(e1) = Operators.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,43--50,55)" + [], "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,43--51,56)" + [], "let testCharToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,43--52,53)" + [], "let testCharToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,43--53,51)" + [], "let testCharToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,43--55,50)" + [], "let testCharToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)" ] - let expectedOptimized = [ - [], "type OperatorTestsChar"; - [], "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)"; - [], "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,63--5,73)"; - [], "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)"; - [], "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,63--7,73)"; - [], "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)"; - [], "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,63--9,73)"; - [], "let testCharAdditionOperator(e1) (e2) = Operators.ToChar (Operators.op_Addition (e1,e2)) @ (11,55--11,64)"; - [], "let testCharAdditionChecked(e1) (e2) = Operators.ToChar (Checked.op_Addition (e1,e2)) @ (24,53--24,70)"; - [], "let testCharToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; - [], "let testCharToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; - [], "let testCharToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; - [], "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; - [], "let testCharToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,43--33,57)"; - [], "let testCharToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; - [], "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; - [], "let testCharToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; - [], "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; - [], "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; - [], "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; - [], "let testCharToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; - [], "let testCharToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; - [], "let testCharToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; - [], "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; - [], "let testCharToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,43--45,49)"; - [], "let testCharToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; - [], "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; - [], "let testCharToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,43--48,51)"; - [], "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; - [], "let testCharToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,43--50,55)"; - [], "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; - [], "let testCharToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,43--52,53)"; - [], "let testCharToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,43--53,51)"; - [], "let testCharToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; - [FC47], "let testCharToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.char = e1 in copyOfStruct.ToString() @ (56,43--56,52)" + [], "type OperatorTestsChar" + [], "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,63--4,72)" + [], "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,63--5,73)" + [], "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,63--6,72)" + [], "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,63--7,73)" + [], "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,63--8,72)" + [], "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,63--9,73)" + [], "let testCharAdditionOperator(e1) (e2) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (11,55--11,64)" + [], "let testCharAdditionChecked(e1) (e2) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2)) @ (24,53--24,70)" + [], "let testCharToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,43--29,58)" + [], "let testCharToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,43--30,59)" + [], "let testCharToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,43--31,59)" + [], "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,43--32,60)" + [], "let testCharToIntChecked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,43--33,57)" + [], "let testCharToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,43--34,59)" + [], "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,43--35,60)" + [], "let testCharToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,43--36,59)" + [], "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,43--37,60)" + [], "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (38,43--38,63)" + [], "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (39,43--39,64)" + [], "let testCharToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,43--41,50)" + [], "let testCharToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,43--42,51)" + [], "let testCharToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,43--43,51)" + [], "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,43--44,52)" + [], "let testCharToIntOperator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,43--45,49)" + [], "let testCharToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,43--46,51)" + [], "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,43--47,52)" + [], "let testCharToInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,43--48,51)" + [], "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,43--49,52)" + [], "let testCharToIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (50,43--50,55)" + [], "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (51,43--51,56)" + [], "let testCharToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (52,43--52,53)" + [], "let testCharToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1)) @ (53,43--53,51)" + [], "let testCharToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,43--55,50)" + [FC47; FC50], "let testCharToStringOperator(e1) = let mutable copyOfStruct: Microsoft.FSharp.Core.char = e1 in copyOfStruct.ToString() @ (56,43--56,52)" ] + testOperators "Char" "char" excludedTests expectedUnoptimized expectedOptimized [] @@ -2730,73 +2727,72 @@ let ``Test Operator Declarations for String`` () = ] let expectedUnoptimized = [ - [], "type OperatorTestsString"; - [], "let testStringEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)"; - [], "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)"; - [], "let testStringLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)"; - [], "let testStringLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)"; - [], "let testStringGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)"; - [], "let testStringGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)"; - [], "let testStringAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,61--11,70)"; - [], "let testStringAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; - [], "let testStringToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; - [], "let testStringToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; - [], "let testStringToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; - [], "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; - [], "let testStringToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; - [], "let testStringToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; - [], "let testStringToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; - [], "let testStringToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; - [], "let testStringToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; - [], "let testStringToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; - [], "let testStringToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; - [], "let testStringToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; - [], "let testStringToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; - [], "let testStringToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; - [], "let testStringToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; - [], "let testStringToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; - [], "let testStringToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; - [], "let testStringToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; - [], "let testStringToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; - [], "let testStringToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; - [], "let testStringToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; - [], "let testStringToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; - [], "let testStringToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + [], "type OperatorTestsString" + [], "let testStringEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,69--4,78)" + [], "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,69--5,79)" + [], "let testStringLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,69--6,78)" + [], "let testStringLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,69--7,79)" + [], "let testStringGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,69--8,78)" + [], "let testStringGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,69--9,79)" + [], "let testStringAdditionOperator(e1) (e2) = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (11,61--11,70)" + [], "let testStringAdditionChecked(e1) (e2) = Checked.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),e1,e2) @ (24,59--24,76)" + [], "let testStringToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (29,47--29,62)" + [], "let testStringToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (30,47--30,63)" + [], "let testStringToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (31,47--31,63)" + [], "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (32,47--32,64)" + [], "let testStringToIntChecked(e1) = Checked.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (33,47--33,61)" + [], "let testStringToInt32Checked(e1) = Checked.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (34,47--34,63)" + [], "let testStringToUInt32Checked(e1) = Checked.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (35,47--35,64)" + [], "let testStringToInt64Checked(e1) = Checked.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (36,47--36,63)" + [], "let testStringToUInt64Checked(e1) = Checked.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (37,47--37,64)" + [], "let testStringToByteOperator(e1) = Operators.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (41,47--41,54)" + [], "let testStringToSByteOperator(e1) = Operators.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (42,47--42,55)" + [], "let testStringToInt16Operator(e1) = Operators.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (43,47--43,55)" + [], "let testStringToUInt16Operator(e1) = Operators.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (44,47--44,56)" + [], "let testStringToIntOperator(e1) = Operators.ToInt (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (45,47--45,53)" + [], "let testStringToInt32Operator(e1) = Operators.ToInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (46,47--46,55)" + [], "let testStringToUInt32Operator(e1) = Operators.ToUInt32 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (47,47--47,56)" + [], "let testStringToInt64Operator(e1) = Operators.ToInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (48,47--48,55)" + [], "let testStringToUInt64Operator(e1) = Operators.ToUInt64 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (49,47--49,56)" + [], "let testStringToSingleOperator(e1) = Operators.ToSingle (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (52,47--52,57)" + [], "let testStringToDoubleOperator(e1) = Operators.ToDouble (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (53,47--53,55)" + [], "let testStringToDecimalOperator(e1) = Operators.ToDecimal (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (54,47--54,57)" + [], "let testStringToCharOperator(e1) = Operators.ToChar (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),e1) @ (55,47--55,54)" + [], "let testStringToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)" ] - let expectedOptimized = [ - [], "type OperatorTestsString"; - [], "let testStringEqualsOperator(e1) (e2) = String.Equals (e1,e2) @ (4,69--4,78)"; - [], "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Equality (String.Equals (e1,e2),False) @ (5,69--5,79)"; - [], "let testStringLessThanOperator(e1) (e2) = HashCompare.GenericLessThanIntrinsic (e1,e2) @ (6,69--6,78)"; - [], "let testStringLessThanOrEqualsOperator(e1) (e2) = HashCompare.GenericLessOrEqualIntrinsic (e1,e2) @ (7,69--7,79)"; - [], "let testStringGreaterThanOperator(e1) (e2) = HashCompare.GenericGreaterThanIntrinsic (e1,e2) @ (8,69--8,78)"; - [], "let testStringGreaterThanOrEqualsOperator(e1) (e2) = HashCompare.GenericGreaterOrEqualIntrinsic (e1,e2) @ (9,69--9,79)"; - [], "let testStringAdditionOperator(e1) (e2) = String.Concat (e1,e2) @ (11,61--11,70)"; - [], "let testStringAdditionChecked(e1) (e2) = String.Concat (e1,e2) @ (24,59--24,76)"; - [], "let testStringToByteChecked(e1) = Checked.ToByte (LanguagePrimitives.ParseUInt32 (e1)) @ (29,47--29,62)"; - [], "let testStringToSByteChecked(e1) = Checked.ToSByte (LanguagePrimitives.ParseInt32 (e1)) @ (30,47--30,63)"; - [], "let testStringToInt16Checked(e1) = Checked.ToInt16 (LanguagePrimitives.ParseInt32 (e1)) @ (31,47--31,63)"; - [], "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (LanguagePrimitives.ParseUInt32 (e1)) @ (32,47--32,64)"; - [], "let testStringToIntChecked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (33,47--33,61)"; - [], "let testStringToInt32Checked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (34,47--34,63)"; - [], "let testStringToUInt32Checked(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (35,47--35,64)"; - [], "let testStringToInt64Checked(e1) = LanguagePrimitives.ParseInt64 (e1) @ (36,47--36,63)"; - [], "let testStringToUInt64Checked(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (37,47--37,64)"; - [], "let testStringToByteOperator(e1) = Checked.ToByte (LanguagePrimitives.ParseUInt32 (e1)) @ (41,47--41,54)"; - [], "let testStringToSByteOperator(e1) = Checked.ToSByte (LanguagePrimitives.ParseInt32 (e1)) @ (42,47--42,55)"; - [], "let testStringToInt16Operator(e1) = Checked.ToInt16 (LanguagePrimitives.ParseInt32 (e1)) @ (43,47--43,55)"; - [], "let testStringToUInt16Operator(e1) = Checked.ToUInt16 (LanguagePrimitives.ParseUInt32 (e1)) @ (44,47--44,56)"; - [], "let testStringToIntOperator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (45,47--45,53)"; - [], "let testStringToInt32Operator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (46,47--46,55)"; - [], "let testStringToUInt32Operator(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (47,47--47,56)"; - [], "let testStringToInt64Operator(e1) = LanguagePrimitives.ParseInt64 (e1) @ (48,47--48,55)"; - [], "let testStringToUInt64Operator(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (49,47--49,56)"; - [], "let testStringToSingleOperator(e1) = Single.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (52,47--52,57)"; - [], "let testStringToDoubleOperator(e1) = Double.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (53,47--53,55)"; - [], "let testStringToDecimalOperator(e1) = Decimal.Parse (e1,167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (54,47--54,57)"; - [], "let testStringToCharOperator(e1) = Char.Parse (e1) @ (55,47--55,54)"; - [FC47], "let testStringToStringOperator(e1) = e1 @ (56,54--56,56)" + [], "type OperatorTestsString" + [], "let testStringEqualsOperator(e1) (e2) = String.Equals (e1,e2) @ (4,69--4,78)" + [], "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Equality (String.Equals (e1,e2),False) @ (5,69--5,79)" + [], "let testStringLessThanOperator(e1) (e2) = HashCompare.GenericLessThanIntrinsic (e1,e2) @ (6,69--6,78)" + [], "let testStringLessThanOrEqualsOperator(e1) (e2) = HashCompare.GenericLessOrEqualIntrinsic (e1,e2) @ (7,69--7,79)" + [], "let testStringGreaterThanOperator(e1) (e2) = HashCompare.GenericGreaterThanIntrinsic (e1,e2) @ (8,69--8,78)" + [], "let testStringGreaterThanOrEqualsOperator(e1) (e2) = HashCompare.GenericGreaterOrEqualIntrinsic (e1,e2) @ (9,69--9,79)" + [], "let testStringAdditionOperator(e1) (e2) = String.Concat (e1,e2) @ (11,61--11,70)" + [], "let testStringAdditionChecked(e1) (e2) = String.Concat (e1,e2) @ (24,59--24,76)" + [], "let testStringToByteChecked(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseUInt32 (e1)) @ (29,47--29,62)" + [], "let testStringToSByteChecked(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseInt32 (e1)) @ (30,47--30,63)" + [], "let testStringToInt16Checked(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseInt32 (e1)) @ (31,47--31,63)" + [], "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseUInt32 (e1)) @ (32,47--32,64)" + [], "let testStringToIntChecked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (33,47--33,61)" + [], "let testStringToInt32Checked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (34,47--34,63)" + [], "let testStringToUInt32Checked(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (35,47--35,64)" + [], "let testStringToInt64Checked(e1) = LanguagePrimitives.ParseInt64 (e1) @ (36,47--36,63)" + [], "let testStringToUInt64Checked(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (37,47--37,64)" + [], "let testStringToByteOperator(e1) = Checked.ToByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseUInt32 (e1)) @ (41,47--41,54)" + [], "let testStringToSByteOperator(e1) = Checked.ToSByte (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseInt32 (e1)) @ (42,47--42,55)" + [], "let testStringToInt16Operator(e1) = Checked.ToInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseInt32 (e1)) @ (43,47--43,55)" + [], "let testStringToUInt16Operator(e1) = Checked.ToUInt16 (fun arg0_0 -> LanguagePrimitives.ExplicitDynamic (arg0_0),LanguagePrimitives.ParseUInt32 (e1)) @ (44,47--44,56)" + [], "let testStringToIntOperator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (45,47--45,53)" + [], "let testStringToInt32Operator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (46,47--46,55)" + [], "let testStringToUInt32Operator(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (47,47--47,56)" + [], "let testStringToInt64Operator(e1) = LanguagePrimitives.ParseInt64 (e1) @ (48,47--48,55)" + [], "let testStringToUInt64Operator(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (49,47--49,56)" + [], "let testStringToSingleOperator(e1) = Single.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (52,47--52,57)" + [], "let testStringToDoubleOperator(e1) = Double.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (53,47--53,55)" + [], "let testStringToDecimalOperator(e1) = Decimal.Parse (e1,167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (54,47--54,57)" + [], "let testStringToCharOperator(e1) = Char.Parse (e1) @ (55,47--55,54)" + [FC47; FC50], "let testStringToStringOperator(e1) = e1 @ (56,54--56,56)" ] testOperators "String" "string" excludedTests expectedUnoptimized expectedOptimized @@ -2996,28 +2992,15 @@ let BigSequenceExpression(outFileOpt,docFileOpt,baseAddressOpt) = """ - let createOptions() = - let temp1 = Utils.getTempFileName() - let temp2 = Utils.getTempFileName() - let fileName1 = Utils.getTempFilePathChangeExt temp1 ".fs" //Path.ChangeExtension(Path.GetTempFileName(), ".fs") - let dllName = Utils.getTempFilePathChangeExt temp2 ".dll" //Path.ChangeExtension(base2, ".dll") - let projFileName = Utils.getTempFilePathChangeExt temp2 ".fsproj" //Path.ChangeExtension(base2, ".fsproj") - - Utils.createTempDir() - File.WriteAllText(fileName1, fileSource1) - - let fileNames = [fileName1] - let args = mkProjectCommandLineArgs (dllName, fileNames) - let options = exprChecker.GetProjectOptionsFromCommandLineArgs (projFileName, args) - - [fileName1; dllName; projFileName], options - - let options = lazy createOptions() + let createOptions() = createOptionsAux [fileSource1] [] -/// This test is run in unison with its optimized counterpart below +[] let ``Test expressions of declarations stress big expressions`` () = - let wholeProjectResults = exprChecker.ParseAndCheckProject(snd ProjectStressBigExpressions.options.Value) |> Async.RunSynchronously + let cleanup, options = ProjectStressBigExpressions.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously wholeProjectResults.Errors.Length |> shouldEqual 0 @@ -3028,9 +3011,12 @@ let ``Test expressions of declarations stress big expressions`` () = printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> ignore -/// This test is run in unison with its unoptimized counterpart below +[] let ``Test expressions of optimized declarations stress big expressions`` () = - let wholeProjectResults = exprChecker.ParseAndCheckProject(snd ProjectStressBigExpressions.options.Value) |> Async.RunSynchronously + let cleanup, options = ProjectStressBigExpressions.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously wholeProjectResults.Errors.Length |> shouldEqual 0 @@ -3040,11 +3026,292 @@ let ``Test expressions of optimized declarations stress big expressions`` () = // This should not stack overflow printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> ignore +//--------------------------------------------------------------------------------------------------------- +// This project is for witness arguments (CallWithWitnesses) + +module internal ProjectForWitnesses1 = + + let fileSource1 = """ +module M + +/// One witness +let inline callX (x: ^T) (y: ^U) = ((^T or ^U): (static member X : ^T * ^U -> ^V) (x,y)) + +/// Two witnesses +let inline callXY (x: ^T) (y: ^U) = + ((^T or ^U): (static member Y1 : ^T * ^U -> unit) (x,y)) + ((^T or ^U): (static member Y2 : ^T * ^U -> unit) (x,y)) + +type C() = + static member X(a: C, b: C) = C() + static member X(a: C, b: D) = D() + static member Y1(a: C, b: C) = () + static member Y1(a: C, b: D) = () + static member Y2(a: C, b: C) = () + static member Y2(a: C, b: D) = () + +and D() = + static member X(a: D, b: D) = D() + static member X(a: D, b: C) = C() + static member Y1(a: D, b: D) = () + static member Y1(a: D, b: C) = () + static member Y2(a: D, b: D) = () + static member Y2(a: D, b: C) = () + +let f1() = callX (C()) (C()) +let f2() = callX (D()) (D()) +let f3() = callX (C()) (D()) +let f4() = callX (D()) (C()) + +let f5() = callXY (C()) (C()) +let f6() = callXY (D()) (D()) +let f7() = callXY (C()) (D()) +let f8() = callXY (D()) (C()) + """ + + let createOptions() = createOptionsAux [fileSource1] ["--langversion:preview"] + +[] +let ``Test ProjectForWitnesses1`` () = + let cleanup, options = ProjectForWitnesses1.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "Project1 error: <<<%s>>>" e.Message + + wholeProjectResults.AssemblyContents.ImplementationFiles.Length |> shouldEqual 1 + let file1 = wholeProjectResults.AssemblyContents.ImplementationFiles.[0] + + let expected = + ["type M"; "let callX(x) (y) = trait call X(x,y) @ (5,35--5,88)"; + "let callXY(x) (y) = (trait call Y1(x,y); trait call Y2(x,y)) @ (9,4--10,60)"; + "type C"; "type D"; + "member .ctor(unitVar0) = (new Object(); ()) @ (12,5--12,6)"; + "member X(a,b) = new C(()) @ (13,34--13,37)"; + "member X(a,b) = new D(()) @ (14,34--14,37)"; + "member Y1(a,b) = () @ (15,35--15,37)"; "member Y1(a,b) = () @ (16,35--16,37)"; + "member Y2(a,b) = () @ (17,35--17,37)"; "member Y2(a,b) = () @ (18,35--18,37)"; + "member .ctor(unitVar0) = (new Object(); ()) @ (20,4--20,5)"; + "member X(a,b) = new D(()) @ (21,34--21,37)"; + "member X(a,b) = new C(()) @ (22,34--22,37)"; + "member Y1(a,b) = () @ (23,35--23,37)"; "member Y1(a,b) = () @ (24,35--24,37)"; + "member Y2(a,b) = () @ (25,35--25,37)"; "member Y2(a,b) = () @ (26,35--26,37)"; + "let f1(unitVar0) = M.callX (fun arg0_0 -> fun arg1_0 -> C.X (arg0_0,arg1_0),new C(()),new C(())) @ (28,11--28,28)"; + "let f2(unitVar0) = M.callX (fun arg0_0 -> fun arg1_0 -> D.X (arg0_0,arg1_0),new D(()),new D(())) @ (29,11--29,28)"; + "let f3(unitVar0) = M.callX (fun arg0_0 -> fun arg1_0 -> C.X (arg0_0,arg1_0),new C(()),new D(())) @ (30,11--30,28)"; + "let f4(unitVar0) = M.callX (fun arg0_0 -> fun arg1_0 -> D.X (arg0_0,arg1_0),new D(()),new C(())) @ (31,11--31,28)"; + "let f5(unitVar0) = M.callXY (fun arg0_0 -> fun arg1_0 -> C.Y1 (arg0_0,arg1_0),fun arg0_0 -> fun arg1_0 -> C.Y2 (arg0_0,arg1_0),new C(()),new C(())) @ (33,11--33,29)"; + "let f6(unitVar0) = M.callXY (fun arg0_0 -> fun arg1_0 -> D.Y1 (arg0_0,arg1_0),fun arg0_0 -> fun arg1_0 -> D.Y2 (arg0_0,arg1_0),new D(()),new D(())) @ (34,11--34,29)"; + "let f7(unitVar0) = M.callXY (fun arg0_0 -> fun arg1_0 -> C.Y1 (arg0_0,arg1_0),fun arg0_0 -> fun arg1_0 -> C.Y2 (arg0_0,arg1_0),new C(()),new D(())) @ (35,11--35,29)"; + "let f8(unitVar0) = M.callXY (fun arg0_0 -> fun arg1_0 -> D.Y1 (arg0_0,arg1_0),fun arg0_0 -> fun arg1_0 -> D.Y2 (arg0_0,arg1_0),new D(()),new C(())) @ (36,11--36,29)"] + + let actual = + printDeclarations None (List.ofSeq file1.Declarations) + |> Seq.toList + printfn "actual:\n\n%A" actual + actual + |> shouldPairwiseEqual expected + + +[] +let ``Test ProjectForWitnesses1 GetWitnessPassingInfo`` () = + let cleanup, options = ProjectForWitnesses1.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "ProjectForWitnesses1 error: <<<%s>>>" e.Message + + begin + let symbol = + wholeProjectResults.GetAllUsesOfAllSymbols() + |> Array.tryFind (fun su -> su.Symbol.DisplayName = "callX") + |> Option.orElseWith (fun _ -> failwith "Could not get symbol") + |> Option.map (fun su -> su.Symbol :?> FSharpMemberOrFunctionOrValue) + |> Option.get + printfn "symbol = %s" symbol.FullName + let wpi = (symbol.GetWitnessPassingInfo()) + match wpi with + | None -> failwith "witness passing info expected" + | Some (nm, argTypes) -> + nm |> shouldEqual "callX$W" + argTypes.Count |> shouldEqual 1 + let argText = argTypes.[0].Type.ToString() + argText |> shouldEqual "type ^T -> ^U -> ^V" + end + + + begin + let symbol = + wholeProjectResults.GetAllUsesOfAllSymbols() + |> Array.tryFind (fun su -> su.Symbol.DisplayName = "callXY") + |> Option.orElseWith (fun _ -> failwith "Could not get symbol") + |> Option.map (fun su -> su.Symbol :?> FSharpMemberOrFunctionOrValue) + |> Option.get + printfn "symbol = %s" symbol.FullName + let wpi = (symbol.GetWitnessPassingInfo()) + match wpi with + | None -> failwith "witness passing info expected" + | Some (nm, argTypes) -> + nm |> shouldEqual "callXY$W" + argTypes.Count |> shouldEqual 2 + let argName1 = argTypes.[0].Name + let argText1 = argTypes.[0].Type.ToString() + let argName2 = argTypes.[1].Name + let argText2 = argTypes.[1].Type.ToString() + argText1 |> shouldEqual "type ^T -> ^U -> Microsoft.FSharp.Core.unit" + argText2 |> shouldEqual "type ^T -> ^U -> Microsoft.FSharp.Core.unit" + end + + +//--------------------------------------------------------------------------------------------------------- +// This project is for witness arguments (CallWithWitnesses) + +module internal ProjectForWitnesses2 = + + let fileSource1 = """ +module M + +type Point = + { x: int; y: int } + static member Zero = { x=0; y=0 } + static member Neg(p: Point) = { x = -p.x; y = -p.y } + static member (+) (p1, p2) = { x= p1.x + p2.x; y = p1.y + p2.y } + +type MyNumber = + | MyNumber of int + static member Zero = MyNumber 0 + static member (+) (MyNumber x, MyNumber y) = + MyNumber(x + y) + static member DivideByInt (MyNumber x, i: int) = + MyNumber(x / i) + +type MyNumberWrapper = + { MyNumber: MyNumber } + """ + + let createOptions() = createOptionsAux [fileSource1] ["--langversion:preview"] + +[] +let ``Test ProjectForWitnesses2`` () = + let cleanup, options = ProjectForWitnesses2.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "ProjectForWitnesses2 error: <<<%s>>>" e.Message + + wholeProjectResults.Errors.Length |> shouldEqual 0 + wholeProjectResults.AssemblyContents.ImplementationFiles.Length |> shouldEqual 1 + let file1 = wholeProjectResults.AssemblyContents.ImplementationFiles.[0] + + let expected = + ["type M"; "type Point"; + "member get_Zero(unitVar0) = {x = 0; y = 0} @ (6,25--6,37)"; + "member Neg(p) = {x = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),p.x); y = Operators.op_UnaryNegation (fun arg0_0 -> LanguagePrimitives.UnaryNegationDynamic (arg0_0),p.y)} @ (7,34--7,56)"; + "member op_Addition(p1,p2) = {x = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),p1.x,p2.x); y = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),p1.y,p2.y)} @ (8,33--8,68)"; + "type MyNumber"; "member get_Zero(unitVar0) = MyNumber(0) @ (12,25--12,35)"; + "member op_Addition(_arg1,_arg2) = let x: Microsoft.FSharp.Core.int = _arg1.Item in let y: Microsoft.FSharp.Core.int = _arg2.Item in MyNumber(Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),x,y)) @ (13,23--13,33)"; + "member DivideByInt(_arg3,i) = let x: Microsoft.FSharp.Core.int = _arg3.Item in MyNumber(Operators.op_Division (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.DivisionDynamic (arg0_0,arg1_0),x,i)) @ (15,31--15,41)"; + "type MyNumberWrapper"] + + let actual = + printDeclarations None (List.ofSeq file1.Declarations) + |> Seq.toList + printfn "actual:\n\n%A" actual + actual + |> shouldPairwiseEqual expected + +//--------------------------------------------------------------------------------------------------------- +// This project is for witness arguments, testing for https://github.com/dotnet/fsharp/issues/10364 + +module internal ProjectForWitnesses3 = + + let fileSource1 = """ +module M + +type Point = + { x: int; y: int } + static member Zero = { x=0; y=0 } + member p.Sign = sign p.x + + static member (+) (p1, p2) = { x= p1.x + p2.x; y = p1.y + p2.y } + +let p1 = {x=1; y=10} +let p2 = {x=2; y=20} +let s = List.sum [p1; p2] +let s2 = sign p1 + + """ + + let createOptions() = createOptionsAux [fileSource1] ["--langversion:preview"] + +[] +let ``Test ProjectForWitnesses3`` () = + let cleanup, options = createOptionsAux [ ProjectForWitnesses3.fileSource1 ] ["--langversion:preview"] + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "ProjectForWitnesses3 error: <<<%s>>>" e.Message + + wholeProjectResults.Errors.Length |> shouldEqual 0 + wholeProjectResults.AssemblyContents.ImplementationFiles.Length |> shouldEqual 1 + let file1 = wholeProjectResults.AssemblyContents.ImplementationFiles.[0] + + let expected = + ["type M"; "type Point"; + "member get_Zero(unitVar0) = {x = 0; y = 0} @ (6,25--6,37)"; + "member get_Sign(p) (unitVar1) = Operators.Sign (fun arg0_0 -> Operators.Sign (arg0_0),p.x) @ (7,20--7,28)"; + "member op_Addition(p1,p2) = {x = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),p1.x,p2.x); y = Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),p1.y,p2.y)} @ (9,33--9,68)"; + "let p1 = {x = 1; y = 10} @ (11,9--11,20)"; + "let p2 = {x = 2; y = 20} @ (12,9--12,20)"; + "let s = ListModule.Sum (fun arg0_0 -> Point.get_Zero (()),fun arg0_0 -> fun arg1_0 -> Point.op_Addition (arg0_0,arg1_0),Cons(M.p1 (),Cons(M.p2 (),Empty()))) @ (13,8--13,25)"; + "let s2 = Operators.Sign (fun arg0_0 -> arg0_0.get_Sign(()),M.p1 ()) @ (14,9--14,16)"] + + let actual = + printDeclarations None (List.ofSeq file1.Declarations) + |> Seq.toList + printfn "actual:\n\n%A" actual + actual + |> shouldPairwiseEqual expected + [] -let ``Test expressions of both optimized and unoptimized declarations for StressTest Big Expressions`` () = - let filenames = fst ProjectStressBigExpressions.options.Value - try - ``Test expressions of optimized declarations stress big expressions`` () - ``Test expressions of declarations stress big expressions`` () - finally - Utils.cleanupTempFiles filenames +let ``Test ProjectForWitnesses3 GetWitnessPassingInfo`` () = + let cleanup, options = ProjectForWitnesses3.createOptions() + use _holder = cleanup + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "ProjectForWitnesses3 error: <<<%s>>>" e.Message + + begin + let symbol = + wholeProjectResults.GetAllUsesOfAllSymbols() + |> Array.tryFind (fun su -> su.Symbol.DisplayName = "sum") + |> Option.orElseWith (fun _ -> failwith "Could not get symbol") + |> Option.map (fun su -> su.Symbol :?> FSharpMemberOrFunctionOrValue) + |> Option.get + printfn "symbol = %s" symbol.FullName + let wpi = (symbol.GetWitnessPassingInfo()) + match wpi with + | None -> failwith "witness passing info expected" + | Some (nm, argTypes) -> + nm |> shouldEqual "Sum$W" + argTypes.Count |> shouldEqual 2 + let argName1 = argTypes.[0].Name + let argText1 = argTypes.[0].Type.ToString() + let argName2 = argTypes.[1].Name + let argText2 = argTypes.[1].Type.ToString() + argName1 |> shouldEqual (Some "get_Zero") + argText1 |> shouldEqual "type Microsoft.FSharp.Core.unit -> ^T" + argName2 |> shouldEqual (Some "op_Addition") + argText2 |> shouldEqual "type ^T -> ^T -> ^T" + end +