提交 78d48f6c 编写于 作者: D dotnet bot 提交者: Kevin Ransom (msft)

Merge master to dev15.8 (#4997)

* Fixing #4967 (#4968)

* Fix internal error when compiling interface implementation lacking an overloaded method implementation - fixes #4967

* Adding a test

* Update E_OverloadMismatch.fs

* Remove a setify + isSingleton combo (#4980)

* remove a setify

* Remove intermediate collection

* Improve async stack traces (#4867)

* very early prototype

* async stack traces

* async cleanup

* minor fix

* async cleanup

* more async cleanup

* integrate async-cleanup

* async cleanup

* fix build

* more cleanup

* minor fixes

* minor fixes

* full exception stacktraces

* fix test

* fix test

* code review

* cleanup naming

* fix build

* undo rethrow and integrate cleanup

* apply renamings

* Further cleanup in control.fs

* add tests and add filtering TryWith, plus other cleanup

* integrate cleanup

* fix tests

* test only runs on .net framework

* slightly tweak primitives to be more suitable for later optimization

* slightly tweak primitives to be more suitable for later optimization

* update baselines

* add check that no line 0 appear in stack

* update baseline

* use struct wrapper for async activation

* simplify code

* simplify code

* update baselines

* update baselines

* fix baseline

* remove dead code

* simplify code

* apply DebuggerHidden in a couple more places

* [ RFC FS-1039] implementation of value options (#4837)

* posible implementation of value options

* fix surface area test

* fix test

* VNone --> ValueNone

* fix surface area

* fix build

* update baselines

* fix baselines

* fix baselines

* fix baselines

* fix baselines

* fix build
上级 c574e8f9
......@@ -448,16 +448,16 @@ module List =
[<Struct>]
type ValueOption<'T> =
| VSome of 'T
| VNone
member x.IsSome = match x with VSome _ -> true | VNone -> false
member x.IsNone = match x with VSome _ -> false | VNone -> true
member x.Value = match x with VSome r -> r | VNone -> failwith "ValueOption.Value: value is None"
| ValueSome of 'T
| ValueNone
member x.IsSome = match x with ValueSome _ -> true | ValueNone -> false
member x.IsNone = match x with ValueSome _ -> false | ValueNone -> true
member x.Value = match x with ValueSome r -> r | ValueNone -> failwith "ValueOption.Value: value is None"
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module ValueOption =
let inline ofOption x = match x with Some x -> VSome x | None -> VNone
let inline bind f x = match x with VSome x -> f x | VNone -> VNone
let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone
let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone
module String =
let indexNotFound() = raise (new KeyNotFoundException("An index for the character was not found in the string"))
......
......@@ -511,7 +511,7 @@ let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary<Stamp, bool>) (
| None -> false
| Some attr ->
match attr.TyconRef.TryDeref with
| VSome _ ->
| ValueSome _ ->
let tcs = tcref.Stamp
match casmap.TryGetValue(tcs) with
| true, c -> c
......@@ -519,7 +519,7 @@ let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary<Stamp, bool>) (
let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref [])
casmap.[tcs] <- exists
exists
| VNone -> false
| ValueNone -> false
let IsSecurityCriticalAttribute g (Attrib(tcref, _, _, _, _, _, _)) =
(tyconRefEq g tcref g.attrib_SecurityCriticalAttribute.TyconRef || tyconRefEq g tcref g.attrib_SecuritySafeCriticalAttribute.TyconRef)
......
此差异已折叠。
......@@ -25,9 +25,7 @@ namespace Microsoft.FSharp.Control
/// computation expressions can check the cancellation condition regularly. Synchronous
/// computations within an asynchronous computation do not automatically check this condition.</remarks>
[<Sealed>]
[<NoEquality; NoComparison>]
[<CompiledName("FSharpAsync`1")>]
[<Sealed; NoEquality; NoComparison; CompiledName("FSharpAsync`1")>]
type Async<'T>
/// <summary>This static class holds members for creating and manipulating asynchronous computations.</summary>
......@@ -417,7 +415,6 @@ namespace Microsoft.FSharp.Control
static member StartImmediate:
computation:Async<unit> * ?cancellationToken:CancellationToken-> unit
/// <summary>Runs an asynchronous computation, starting immediately on the current operating system,
/// but also returns the execution as <c>System.Threading.Tasks.Task</c>
/// </summary>
......@@ -435,6 +432,112 @@ namespace Microsoft.FSharp.Control
computation:Async<'T> * ?cancellationToken:CancellationToken-> Task<'T>
/// <summary>The F# compiler emits references to this type to implement F# async expressions.</summary>
type AsyncReturn
/// <summary>The F# compiler emits references to this type to implement F# async expressions.</summary>
[<Struct; NoEquality; NoComparison>]
type AsyncActivation<'T> =
/// <summary>The F# compiler emits calls to this function to implement F# async expressions.</summary>
///
/// <returns>A value indicating asynchronous execution.</returns>
member IsCancellationRequested: bool
/// <summary>The F# compiler emits calls to this function to implement F# async expressions.</summary>
///
/// <returns>A value indicating asynchronous execution.</returns>
member OnSuccess: 'T -> AsyncReturn
/// <summary>The F# compiler emits calls to this function to implement F# async expressions.</summary>
member OnExceptionRaised: unit -> unit
/// <summary>The F# compiler emits calls to this function to implement F# async expressions.</summary>
///
/// <returns>A value indicating asynchronous execution.</returns>
member OnCancellation: unit -> AsyncReturn
/// Used by MailboxProcessor
member internal QueueContinuationWithTrampoline: 'T -> AsyncReturn
/// Used by MailboxProcessor
member internal CallContinuation: 'T -> AsyncReturn
[<NoEquality; NoComparison>]
// Internals used by MailboxProcessor
type internal AsyncResult<'T> =
| Ok of 'T
| Error of ExceptionDispatchInfo
| Canceled of OperationCanceledException
[<Sealed>]
/// <summary>Entry points for generated code</summary>
module AsyncPrimitives =
/// <summary>The F# compiler emits calls to this function to implement F# async expressions.</summary>
///
/// <param name="body">The body of the async computation.</param>
///
/// <returns>The async computation.</returns>
val MakeAsync: body:(AsyncActivation<'T> -> AsyncReturn) -> Async<'T>
/// <summary>The F# compiler emits calls to this function to implement constructs for F# async expressions.</summary>
///
/// <param name="computation">The async computation.</param>
/// <param name="ctxt">The async activation.</param>
///
/// <returns>A value indicating asynchronous execution.</returns>
val Invoke: computation: Async<'T> -> ctxt:AsyncActivation<'T> -> AsyncReturn
/// <summary>The F# compiler emits calls to this function to implement constructs for F# async expressions.</summary>
///
/// <param name="ctxt">The async activation.</param>
/// <param name="result">The result of the first part of the computation.</param>
/// <param name="part2">A function returning the second part of the computation.</param>
///
/// <returns>A value indicating asynchronous execution.</returns>
val CallThenInvoke: ctxt:AsyncActivation<'T> -> result1:'U -> part2:('U -> Async<'T>) -> AsyncReturn
/// <summary>The F# compiler emits calls to this function to implement the <c>let!</c> construct for F# async expressions.</summary>
///
/// <param name="ctxt">The async activation.</param>
/// <param name="part2">A function returning the second part of the computation.</param>
///
/// <returns>An async activation suitable for running part1 of the asynchronous execution.</returns>
val Bind: ctxt:AsyncActivation<'T> -> part1:Async<'U> -> part2:('U -> Async<'T>) -> AsyncReturn
/// <summary>The F# compiler emits calls to this function to implement the <c>try/finally</c> construct for F# async expressions.</summary>
///
/// <param name="ctxt">The async activation.</param>
/// <param name="computation">The computation to protect.</param>
/// <param name="finallyFunction">The finally code.</param>
///
/// <returns>A value indicating asynchronous execution.</returns>
val TryFinally: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> finallyFunction: (unit -> unit) -> AsyncReturn
/// <summary>The F# compiler emits calls to this function to implement the <c>try/with</c> construct for F# async expressions.</summary>
///
/// <param name="ctxt">The async activation.</param>
/// <param name="computation">The computation to protect.</param>
/// <param name="catchFunction">The exception filter.</param>
///
/// <returns>A value indicating asynchronous execution.</returns>
val TryWith: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> catchFunction: (Exception -> Async<'T> option) -> AsyncReturn
[<Sealed; AutoSerializable(false)>]
// Internals used by MailboxProcessor
type internal ResultCell<'T> =
new : unit -> ResultCell<'T>
member GetWaitHandle: unit -> WaitHandle
member Close: unit -> unit
interface IDisposable
member RegisterResult: 'T * reuseThread: bool -> AsyncReturn
member GrabResult: unit -> 'T
member ResultAvailable : bool
member AwaitResult_NoDirectCancelOrTimeout : Async<'T>
member TryWaitForResultSynchronously: ?timeout: int -> 'T option
// Internals used by MailboxProcessor
val internal CreateAsyncResultAsync : AsyncResult<'T> -> Async<'T>
[<CompiledName("FSharpAsyncBuilder")>]
[<Sealed>]
......@@ -473,7 +576,7 @@ namespace Microsoft.FSharp.Control
/// <param name="computation1">The first part of the sequenced computation.</param>
/// <param name="computation2">The second part of the sequenced computation.</param>
/// <returns>An asynchronous computation that runs both of the computations sequentially.</returns>
member Combine : computation1:Async<unit> * computation2:Async<'T> -> Async<'T>
member inline Combine : computation1:Async<unit> * computation2:Async<'T> -> Async<'T>
/// <summary>Creates an asynchronous computation that runs <c>computation</c> repeatedly
/// until <c>guard()</c> becomes false.</summary>
......@@ -496,7 +599,7 @@ namespace Microsoft.FSharp.Control
/// <c>async { ... }</c> computation expression syntax.</remarks>
/// <param name="value">The value to return from the computation.</param>
/// <returns>An asynchronous computation that returns <c>value</c> when executed.</returns>
member Return : value:'T -> Async<'T>
member inline Return : value:'T -> Async<'T>
/// <summary>Delegates to the input computation.</summary>
///
......@@ -504,7 +607,7 @@ namespace Microsoft.FSharp.Control
/// <c>async { ... }</c> computation expression syntax.</remarks>
/// <param name="computation">The input computation.</param>
/// <returns>The input computation.</returns>
member ReturnFrom : computation:Async<'T> -> Async<'T>
member inline ReturnFrom : computation:Async<'T> -> Async<'T>
/// <summary>Creates an asynchronous computation that runs <c>generator</c>.</summary>
///
......@@ -538,7 +641,7 @@ namespace Microsoft.FSharp.Control
/// <param name="binder">The function to bind the result of <c>computation</c>.</param>
/// <returns>An asynchronous computation that performs a monadic bind on the result
/// of <c>computation</c>.</returns>
member Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U>
member inline Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U>
/// <summary>Creates an asynchronous computation that runs <c>computation</c>. The action <c>compensation</c> is executed
/// after <c>computation</c> completes, whether <c>computation</c> exits normally or by an exception. If <c>compensation</c> raises an exception itself
......@@ -553,7 +656,7 @@ namespace Microsoft.FSharp.Control
/// exception (including cancellation).</param>
/// <returns>An asynchronous computation that executes computation and compensation afterwards or
/// when an exception is raised.</returns>
member TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T>
member inline TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T>
/// <summary>Creates an asynchronous computation that runs <c>computation</c> and returns its result.
/// If an exception happens then <c>catchHandler(exn)</c> is called and the resulting computation executed instead.</summary>
......@@ -562,11 +665,14 @@ namespace Microsoft.FSharp.Control
///
/// The existence of this method permits the use of <c>try/with</c> in the
/// <c>async { ... }</c> computation expression syntax.</remarks>
///
/// <param name="computation">The input computation.</param>
/// <param name="catchHandler">The function to run when <c>computation</c> throws an exception.</param>
/// <returns>An asynchronous computation that executes <c>computation</c> and calls <c>catchHandler</c> if an
/// exception is thrown.</returns>
member TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T>
member inline TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T>
// member inline TryWithFilter : computation:Async<'T> * catchHandler:(exn -> Async<'T> option) -> Async<'T>
/// Generate an object used to build asynchronous computations using F# computation expressions. The value
/// 'async' is a pre-defined instance of this type.
......@@ -659,41 +765,6 @@ namespace Microsoft.FSharp.Control
#endif
// Internals used by MailboxProcessor
module internal AsyncImpl =
module internal AsyncBuilderImpl =
val async : AsyncBuilder
[<Sealed>]
// Internals used by MailboxProcessor
type internal AsyncReturn
[<Sealed>]
// Internals used by MailboxProcessor
type internal AsyncActivation<'T> =
member QueueContinuationWithTrampoline: 'T -> AsyncReturn
member CallContinuation: 'T -> AsyncReturn
[<NoEquality; NoComparison>]
// Internals used by MailboxProcessor
type internal AsyncResult<'T> =
| Ok of 'T
| Error of ExceptionDispatchInfo
| Canceled of OperationCanceledException
// Internals used by MailboxProcessor
module internal AsyncPrimitives =
[<Sealed; AutoSerializable(false)>]
type internal ResultCell<'T> =
new : unit -> ResultCell<'T>
member GetWaitHandle: unit -> WaitHandle
member Close: unit -> unit
interface IDisposable
member RegisterResult: 'T * reuseThread: bool -> AsyncReturn
member GrabResult: unit -> 'T
member ResultAvailable : bool
member AwaitResult_NoDirectCancelOrTimeout : Async<'T>
member TryWaitForResultSynchronously: ?timeout: int -> 'T option
val CreateAsyncResultAsync : AsyncResult<'T> -> Async<'T>
val MakeAsync : (AsyncActivation<'T> -> AsyncReturn) -> Async<'T>
......@@ -7,7 +7,7 @@ namespace Microsoft.FSharp.Control
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Control
open Microsoft.FSharp.Control.AsyncImpl
open Microsoft.FSharp.Control.AsyncBuilderImpl
open Microsoft.FSharp.Control.AsyncPrimitives
open Microsoft.FSharp.Collections
......
......@@ -2764,17 +2764,17 @@ namespace Microsoft.FSharp.Core
// Function Values
[<AbstractClass>]
type FSharpTypeFunc() =
type FSharpTypeFunc [<DebuggerHidden>] () =
abstract Specialize<'T> : unit -> obj
[<AbstractClass>]
type FSharpFunc<'T,'Res>() =
type FSharpFunc<'T,'Res> [<DebuggerHidden>] () =
abstract Invoke : 'T -> 'Res
module OptimizedClosures =
[<AbstractClass>]
type FSharpFunc<'T,'U,'V>() =
type FSharpFunc<'T,'U,'V> [<DebuggerHidden>] () =
inherit FSharpFunc<'T,('U -> 'V)>()
abstract Invoke : 'T * 'U -> 'V
override f.Invoke(t) = (fun u -> f.Invoke(t,u))
......@@ -2787,7 +2787,7 @@ namespace Microsoft.FSharp.Core
member x.Invoke(t,u) = (retype func : FSharpFunc<'T,FSharpFunc<'U,'V>>).Invoke(t).Invoke(u) }
[<AbstractClass>]
type FSharpFunc<'T,'U,'V,'W>() =
type FSharpFunc<'T,'U,'V,'W> [<DebuggerHidden>] () =
inherit FSharpFunc<'T,('U -> 'V -> 'W)>()
abstract Invoke : 'T * 'U * 'V -> 'W
override f.Invoke(t) = (fun u v -> f.Invoke(t,u,v))
......@@ -2805,7 +2805,7 @@ namespace Microsoft.FSharp.Core
member x.Invoke(t,u,v) = (retype func : FSharpFunc<'T,('U -> 'V -> 'W)>).Invoke(t) u v }
[<AbstractClass>]
type FSharpFunc<'T,'U,'V,'W,'X>() =
type FSharpFunc<'T,'U,'V,'W,'X> [<DebuggerHidden>] () =
inherit FSharpFunc<'T,('U -> 'V -> 'W -> 'X)>()
abstract Invoke : 'T * 'U * 'V * 'W -> 'X
static member Adapt(func : 'T -> 'U -> 'V -> 'W -> 'X) =
......@@ -2828,7 +2828,7 @@ namespace Microsoft.FSharp.Core
override f.Invoke(t) = (fun u v w -> f.Invoke(t,u,v,w))
[<AbstractClass>]
type FSharpFunc<'T,'U,'V,'W,'X,'Y>() =
type FSharpFunc<'T,'U,'V,'W,'X,'Y> [<DebuggerHidden>] () =
inherit FSharpFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>()
abstract Invoke : 'T * 'U * 'V * 'W * 'X -> 'Y
override f.Invoke(t) = (fun u v w x -> f.Invoke(t,u,v,w,x))
......@@ -2972,7 +2972,6 @@ namespace Microsoft.FSharp.Core
and 'T option = Option<'T>
[<StructuralEquality; StructuralComparison>]
[<CompiledName("FSharpResult`2")>]
[<Struct>]
......@@ -2980,6 +2979,17 @@ namespace Microsoft.FSharp.Core
| Ok of ResultValue:'T
| Error of ErrorValue:'TError
[<StructuralEquality; StructuralComparison>]
[<Struct>]
[<CompiledName("FSharpValueOption`1")>]
type ValueOption<'T> =
| ValueNone : 'T voption
| ValueSome : 'T -> 'T voption
member x.Value = match x with ValueSome x -> x | ValueNone -> raise (new System.InvalidOperationException("ValueOption.Value"))
and 'T voption = ValueOption<'T>
namespace Microsoft.FSharp.Collections
......@@ -3345,11 +3355,11 @@ namespace Microsoft.FSharp.Core
let (^) (s1: string) (s2: string) = System.String.Concat(s1, s2)
[<CompiledName("DefaultArg")>]
[<CodeAnalysis.SuppressMessage("Microsoft.Naming","CA1704:IdentifiersShouldBeSpelledCorrectly")>]
let defaultArg arg defaultValue = match arg with None -> defaultValue | Some v -> v
[<CompiledName("DefaultValueArg")>]
let defaultValueArg arg defaultValue = match arg with ValueNone -> defaultValue | ValueSome v -> v
[<NoDynamicInvocation>]
let inline (~-) (n: ^T) : ^T =
......
......@@ -1733,6 +1733,33 @@ namespace Microsoft.FSharp.Core
/// due to the use of <c>null</c> as a value representation.</remarks>
and 'T option = Option<'T>
/// <summary>The type of optional values, represented as structs.</summary>
///
/// <remarks>Use the constructors <c>ValueSome</c> and <c>ValueNone</c> to create values of this type.
/// Use the values in the <c>ValueOption</c> module to manipulate values of this type,
/// or pattern match against the values directly.
[<StructuralEquality; StructuralComparison>]
[<CompiledName("FSharpValueOption`1")>]
[<Struct>]
type ValueOption<'T> =
/// <summary>The representation of "No value"</summary>
| ValueNone: 'T voption
/// <summary>The representation of "Value of type 'T"</summary>
/// <param name="Value">The input value.</param>
/// <returns>An option representing the value.</returns>
| ValueSome: 'T -> 'T voption
/// <summary>Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'.</summary>
member Value : 'T
/// <summary>The type of optional values, represented as structs.</summary>
///
/// <remarks>Use the constructors <c>ValueSome</c> and <c>ValueNone</c> to create values of this type.
/// Use the values in the <c>ValueOption</c> module to manipulate values of this type,
/// or pattern match against the values directly.
and 'T voption = ValueOption<'T>
/// <summary>Helper type for error handling without exceptions.</summary>
[<StructuralEquality; StructuralComparison>]
[<CompiledName("FSharpResult`2")>]
......@@ -1998,6 +2025,13 @@ namespace Microsoft.FSharp.Core
[<CompiledName("DefaultArg")>]
val defaultArg : arg:'T option -> defaultValue:'T -> 'T
/// <summary>Used to specify a default value for an optional argument in the implementation of a function</summary>
/// <param name="arg">A value option representing the argument.</param>
/// <param name="defaultValue">The default value of the argument.</param>
/// <returns>The argument value. If it is None, the defaultValue is returned.</returns>
[<CompiledName("DefaultValueArg")>]
val defaultValueArg : arg:'T voption -> defaultValue:'T -> 'T
/// <summary>Concatenate two strings. The operator '+' may also be used.</summary>
[<CompilerMessage("This construct is for ML compatibility. Consider using the '+' operator instead. This may require a type annotation to indicate it acts on strings. This message can be disabled using '--nowarn:62' or '#nowarn \"62\"'.", 62, IsHidden=true)>]
val (^): s1:string -> s2:string -> string
......
......@@ -714,11 +714,11 @@ let AddStorageForVal (g: TcGlobals) (v,s) eenv =
| None -> eenv
| Some vref ->
match vref.TryDeref with
| VNone ->
| ValueNone ->
//let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range)
//System.Diagnostics.Debug.Assert(false, msg)
eenv
| VSome gv ->
| ValueSome gv ->
{ eenv with valsInScope = eenv.valsInScope.Add gv s }
else
eenv
......
......@@ -305,8 +305,7 @@ module DispatchSlotChecking =
let (CompiledSig (vargtys,_,fvmtps,_)) = compiledSig
if moreThanOnePossibleDispatchSlot then
// Error will be reported below in CheckOverridesAreAllUsedOnce
()
noimpl()
elif argTys.Length <> vargtys.Length then
fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfArguments(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
......
......@@ -249,8 +249,8 @@ type Item =
let valRefHash (vref: ValRef) =
match vref.TryDeref with
| VNone -> 0
| VSome v -> LanguagePrimitives.PhysicalHash v
| ValueNone -> 0
| ValueSome v -> LanguagePrimitives.PhysicalHash v
[<RequireQualifiedAccess>]
/// Pairs an Item with a TyparInst showing how generic type variables of the item are instantiated at
......
......@@ -6324,9 +6324,9 @@ let mkCallLiftValueWithName (g:TcGlobals) m ty nm e1 =
let vref = ValRefForIntrinsic g.lift_value_with_name_info
// Use "Expr.ValueWithName" if it exists in FSharp.Core
match vref.TryDeref with
| VSome _ ->
| ValueSome _ ->
mkApps g (typedExprForIntrinsic g m g.lift_value_with_name_info , [[ty]], [mkRefTupledNoTypes g m [e1; mkString g m nm]], m)
| VNone ->
| ValueNone ->
mkApps g (typedExprForIntrinsic g m g.lift_value_info , [[ty]], [e1], m)
let mkCallLiftValueWithDefn g m qty e1 =
......@@ -6335,11 +6335,11 @@ let mkCallLiftValueWithDefn g m qty e1 =
let vref = ValRefForIntrinsic g.lift_value_with_defn_info
// Use "Expr.WithValue" if it exists in FSharp.Core
match vref.TryDeref with
| VSome _ ->
| ValueSome _ ->
let copyOfExpr = copyExpr g ValCopyFlag.CloneAll e1
let quoteOfCopyOfExpr = Expr.Quote(copyOfExpr, ref None, false, m, qty)
mkApps g (typedExprForIntrinsic g m g.lift_value_with_defn_info , [[ty]], [mkRefTupledNoTypes g m [e1; quoteOfCopyOfExpr]], m)
| VNone ->
| ValueNone ->
Expr.Quote(e1, ref None, false, m, qty)
let mkCallCheckThis g m ty e1 =
......
......@@ -10036,11 +10036,13 @@ and TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfo
// The loop variable callerLambdaTyOpt becomes None if something failed.
let rec loop callerLambdaTy lambdaVarNum =
if lambdaVarNum < numLambdaVars then
let col = [ for row in prefixOfLambdaArgsForEachOverload -> row.[lambdaVarNum] ]
// Check if all the rows give the same argument type
if col |> ListSet.setify (typeEquiv cenv.g) |> isSingleton then
let calledLambdaArgTy = col.[0]
// Force the caller to be a function type.
let calledLambdaArgTy = prefixOfLambdaArgsForEachOverload.[0].[lambdaVarNum]
let allRowsGiveSameArgumentType =
prefixOfLambdaArgsForEachOverload
|> Array.forall (fun row -> typeEquiv cenv.g calledLambdaArgTy row.[lambdaVarNum])
if allRowsGiveSameArgumentType then
// Force the caller to be a function type.
match UnifyFunctionTypeUndoIfFailed cenv env.DisplayEnv mArg callerLambdaTy with
| Some (callerLambdaDomainTy, callerLambdaRangeTy) ->
if AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css mArg calledLambdaArgTy callerLambdaDomainTy then
......@@ -16913,8 +16915,8 @@ let ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap (ccu: CcuThunk) scopem env
let h, t = List.frontAndBack p
let modref = mkNonLocalTyconRef (mkNonLocalEntityRef ccu (Array.ofList h)) t
match modref.TryDeref with
| VNone -> warn()
| VSome _ ->
| ValueNone -> warn()
| ValueSome _ ->
let openDecl = OpenDeclaration.Create ([], [modref], scopem, false)
OpenModulesOrNamespaces TcResultsSink.NoSink g amap scopem root env [modref] openDecl
......
......@@ -1095,7 +1095,7 @@ type MethInfo =
| ILMeth(_,ilmeth,_) -> ilmeth.IsClassConstructor
| FSMeth(_,_,vref,_) ->
match vref.TryDeref with
| VSome x -> x.IsClassConstructor
| ValueSome x -> x.IsClassConstructor
| _ -> false
| DefaultStructCtor _ -> false
#if !NO_EXTENSIONTYPING
......
......@@ -2899,7 +2899,7 @@ and NonLocalEntityRef =
/// Try to find the entity corresponding to the given path in the given CCU
static member TryDerefEntityPath(ccu: CcuThunk, path:string[], i:int, entity:Entity) =
if i >= path.Length then VSome entity
if i >= path.Length then ValueSome entity
else
let next = entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind(path.[i])
match next with
......@@ -2907,7 +2907,7 @@ and NonLocalEntityRef =
#if !NO_EXTENSIONTYPING
| None -> NonLocalEntityRef.TryDerefEntityPathViaProvidedType(ccu, path, i, entity)
#else
| None -> VNone
| None -> ValueNone
#endif
#if !NO_EXTENSIONTYPING
......@@ -2925,11 +2925,11 @@ and NonLocalEntityRef =
// types until i = path.Length-1. Create the Tycon's as needed
let rec tryResolveNestedTypeOf(parentEntity:Entity,resolutionEnvironment,st:Tainted<ProvidedType>,i) =
match st.PApply((fun st -> st.GetNestedType path.[i]),m) with
| Tainted.Null -> VNone
| Tainted.Null -> ValueNone
| st ->
let newEntity = Construct.NewProvidedTycon(resolutionEnvironment, st, ccu.ImportProvidedType, false, m)
parentEntity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity)
if i = path.Length-1 then VSome(newEntity)
if i = path.Length-1 then ValueSome(newEntity)
else tryResolveNestedTypeOf(newEntity,resolutionEnvironment,st,i+1)
tryResolveNestedTypeOf(entity,resolutionEnvironment,st,i)
......@@ -2987,18 +2987,18 @@ and NonLocalEntityRef =
// newEntity is at 'j'
NonLocalEntityRef.TryDerefEntityPath(ccu, path, (j+1), newEntity)
| [] -> VNone
| [] -> ValueNone
| _ -> failwith "Unexpected"
let rec tryResolvePrefixes j =
if j >= path.Length then VNone
if j >= path.Length then ValueNone
else match tryResolvePrefix j with
| VNone -> tryResolvePrefixes (j+1)
| VSome res -> VSome res
| ValueNone -> tryResolvePrefixes (j+1)
| ValueSome res -> ValueSome res
tryResolvePrefixes i
| _ -> VNone
| _ -> ValueNone
#endif
/// Try to link a non-local entity reference to an actual entity
......@@ -3007,11 +3007,11 @@ and NonLocalEntityRef =
if canError then
ccu.EnsureDerefable(path)
if ccu.IsUnresolvedReference then VNone else
if ccu.IsUnresolvedReference then ValueNone else
match NonLocalEntityRef.TryDerefEntityPath(ccu, path, 0, ccu.Contents) with
| VSome _ as r -> r
| VNone ->
| ValueSome _ as r -> r
| ValueNone ->
// OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly.
// Look for a forwarder for each prefix-path
let rec tryForwardPrefixPath i =
......@@ -3021,7 +3021,7 @@ and NonLocalEntityRef =
| Some tcref -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), tcref.Deref)
| None -> tryForwardPrefixPath (i+1)
else
VNone
ValueNone
tryForwardPrefixPath 0
/// Get the CCU referenced by the nonlocal reference.
......@@ -3053,8 +3053,8 @@ and NonLocalEntityRef =
/// Dereference the nonlocal reference, and raise an error if this fails.
member nleref.Deref =
match nleref.TryDeref(canError=true) with
| VSome res -> res
| VNone ->
| ValueSome res -> res
| ValueNone ->
errorR (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefModuleNamespace, nleref.DisplayName, nleref.AssemblyName, "<some module on this path>"))
raise (KeyNotFoundException())
......@@ -3084,9 +3084,9 @@ and
member private tcr.Resolve(canError) =
let res = tcr.nlr.TryDeref(canError)
match res with
| VSome r ->
| ValueSome r ->
tcr.binding <- nullableSlotFull r
| VNone ->
| ValueNone ->
()
/// Dereference the TyconRef to a Tycon. Amortize the cost of doing this.
......@@ -3107,11 +3107,11 @@ and
| null ->
tcr.Resolve(canError=false)
match box tcr.binding with
| null -> VNone
| _ -> VSome tcr.binding
| null -> ValueNone
| _ -> ValueSome tcr.binding
| _ ->
VSome tcr.binding
ValueSome tcr.binding
/// Is the destination assembly available?
member tcr.CanDeref = tcr.TryDeref.IsSome
......@@ -3434,8 +3434,8 @@ and
let e = nlr.EnclosingEntity.Deref
let possible = e.ModuleOrNamespaceType.TryLinkVal(nlr.EnclosingEntity.nlr.Ccu, nlr.ItemKey)
match possible with
| VNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey))
| VSome h -> h
| ValueNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey))
| ValueSome h -> h
vr.binding <- nullableSlotFull res
res
else vr.binding
......@@ -3445,14 +3445,14 @@ and
if obj.ReferenceEquals(vr.binding, null) then
let resOpt =
match vr.nlr.EnclosingEntity.TryDeref with
| VNone -> VNone
| VSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey)
| ValueNone -> ValueNone
| ValueSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey)
match resOpt with
| VNone -> ()
| VSome res ->
| ValueNone -> ()
| ValueSome res ->
vr.binding <- nullableSlotFull res
resOpt
else VSome vr.binding
else ValueSome vr.binding
/// The type of the value. May be a TType_forall for a generic value.
/// May be a type variable or type containing type variables during type inference.
......
......@@ -215,4 +215,37 @@ type OptionModule() =
member this.MapBindEquivalenceProperties () =
let fn x = x + 3
Assert.AreEqual(Option.map fn None, Option.bind (fn >> Some) None)
Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5))
\ No newline at end of file
Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5))
[<TestFixture>]
type ValueOptionTests() =
let assertWasNotCalledThunk () = raise (exn "Thunk should not have been called.")
[<Test>]
member this.ValueOptionBasics () =
Assert.AreEqual( (ValueNone: int voption), (ValueNone: int voption))
Assert.True( (ValueNone: int voption) <= (ValueNone: int voption))
Assert.True( (ValueNone: int voption) >= (ValueNone: int voption))
Assert.True( (ValueNone: int voption) < (ValueSome 1: int voption))
Assert.True( (ValueSome 0: int voption) < (ValueSome 1: int voption))
Assert.True( (ValueSome 1: int voption) > (ValueSome 0: int voption))
Assert.False( (ValueSome 1: int voption) < (ValueNone : int voption))
Assert.True( (ValueSome 1: int voption) <= (ValueSome 1: int voption))
Assert.AreEqual( compare (ValueSome 1) (ValueSome 1), 0)
Assert.True( compare (ValueSome 0) (ValueSome 1) < 0)
Assert.True( compare (ValueNone: int voption) (ValueSome 1) < 0)
Assert.True( compare (ValueSome 1) (ValueNone : int voption) > 0)
Assert.AreEqual( ValueSome 1, ValueSome 1)
Assert.AreNotEqual( ValueSome 2, ValueSome 1)
Assert.AreEqual( ValueSome 2, ValueSome 2)
Assert.AreEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 2))
Assert.AreNotEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 1))
Assert.AreNotEqual( ValueSome (ValueSome 0), ValueSome ValueNone)
Assert.AreEqual( ValueSome (ValueNone: int voption), ValueSome (ValueNone: int voption))
Assert.AreEqual( (ValueSome (ValueNone: int voption)).Value, (ValueNone: int voption))
Assert.AreEqual( (ValueSome 1).Value, 1)
Assert.AreEqual( (ValueSome (1,2)).Value, (1,2))
Assert.AreEqual(defaultValueArg ValueNone 1, 1)
Assert.AreEqual(defaultValueArg (ValueSome 3) 1, 3)
......@@ -568,6 +568,29 @@ Microsoft.FSharp.Collections.SetModule: TState FoldBack[T,TState](Microsoft.FSha
Microsoft.FSharp.Collections.SetModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Collections.SetModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Collections.SetModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean IsCancellationRequested
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean get_IsCancellationRequested()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnCancellation()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Void OnExceptionRaised()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnSuccess(T)
Microsoft.FSharp.Control.AsyncActivation`1[T]: System.String ToString()
Microsoft.FSharp.Control.AsyncActivation`1[T]: System.Type GetType()
Microsoft.FSharp.Control.AsyncPrimitives: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncPrimitives: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Bind[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn CallThenInvoke[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], TResult, Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Invoke[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Control.AsyncActivation`1[T])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryFinally[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryWith[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn])
Microsoft.FSharp.Control.AsyncPrimitives: System.String ToString()
Microsoft.FSharp.Control.AsyncPrimitives: System.Type GetType()
Microsoft.FSharp.Control.AsyncReturn: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncReturn: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncReturn: System.String ToString()
Microsoft.FSharp.Control.AsyncReturn: System.Type GetType()
Microsoft.FSharp.Control.CommonExtensions: Boolean Equals(System.Object)
Microsoft.FSharp.Control.CommonExtensions: Int32 GetHashCode()
Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32])
......@@ -2117,6 +2140,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue()
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T])
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T])
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value()
Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]()
......@@ -2545,6 +2598,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T)
Microsoft.FSharp.Core.Operators: T Cos[T](T)
Microsoft.FSharp.Core.Operators: T Cosh[T](T)
Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T)
Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T)
Microsoft.FSharp.Core.Operators: T Exit[T](Int32)
Microsoft.FSharp.Core.Operators: T Exp[T](T)
Microsoft.FSharp.Core.Operators: T FailWith[T](System.String)
......
......@@ -555,6 +555,29 @@ Microsoft.FSharp.Collections.SetModule: TState FoldBack[T,TState](Microsoft.FSha
Microsoft.FSharp.Collections.SetModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Collections.SetModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Collections.SetModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpSet`1[T])
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean IsCancellationRequested
Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean get_IsCancellationRequested()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnCancellation()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Void OnExceptionRaised()
Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnSuccess(T)
Microsoft.FSharp.Control.AsyncActivation`1[T]: System.String ToString()
Microsoft.FSharp.Control.AsyncActivation`1[T]: System.Type GetType()
Microsoft.FSharp.Control.AsyncPrimitives: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncPrimitives: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Bind[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn CallThenInvoke[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], TResult, Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Invoke[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Control.AsyncActivation`1[T])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryFinally[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryWith[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]])
Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn])
Microsoft.FSharp.Control.AsyncPrimitives: System.String ToString()
Microsoft.FSharp.Control.AsyncPrimitives: System.Type GetType()
Microsoft.FSharp.Control.AsyncReturn: Boolean Equals(System.Object)
Microsoft.FSharp.Control.AsyncReturn: Int32 GetHashCode()
Microsoft.FSharp.Control.AsyncReturn: System.String ToString()
Microsoft.FSharp.Control.AsyncReturn: System.Type GetType()
Microsoft.FSharp.Control.CommonExtensions: Boolean Equals(System.Object)
Microsoft.FSharp.Control.CommonExtensions: Int32 GetHashCode()
Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32])
......@@ -2197,6 +2220,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue()
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue
Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString()
Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T])
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T])
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T)
Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item()
Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value()
Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object)
Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode()
Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]()
......@@ -2629,8 +2682,8 @@ Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_
Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range[T](T, T)
Microsoft.FSharp.Core.Operators: System.Decimal ToDecimal[T](T)
Microsoft.FSharp.Core.Operators: System.Exception Failure(System.String)
Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]()
Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleError[T]()
Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]()
Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleOut[T]()
Microsoft.FSharp.Core.Operators: System.Object Box[T](T)" +
#if DEBUG
......@@ -2653,6 +2706,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T)
Microsoft.FSharp.Core.Operators: T Cos[T](T)
Microsoft.FSharp.Core.Operators: T Cosh[T](T)
Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T)
Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T)
Microsoft.FSharp.Core.Operators: T Exit[T](Int32)
Microsoft.FSharp.Core.Operators: T Exp[T](T)
Microsoft.FSharp.Core.Operators: T FailWith[T](System.String)
......
......@@ -30,6 +30,7 @@ let FSI_BASIC = FSI_FILE
let FSIANYCPU_BASIC = FSIANYCPU_FILE
#endif
(*
[<Test>]
let diamondAssembly () =
let cfg = testConfig "typeProviders/diamondAssembly"
......@@ -358,3 +359,4 @@ let wedgeAssembly () =
peverify cfg "test3.exe"
exec cfg ("." ++ "test3.exe") ""
*)
// Tests that async stack traces contain certain method names
// See https://github.com/Microsoft/visualfsharp/pull/4867
// The focus of the tests is on the synchronous parts of async execution, and on exceptions.
let mutable failures = []
let syncObj = new obj()
let report_failure s =
stderr.WriteLine " NO";
lock syncObj (fun () ->
failures <- s :: failures;
printfn "FAILURE: %s failed" s
)
let test s b = stderr.Write(s:string); if b then stderr.WriteLine " OK" else report_failure s
let checkQuiet s x1 x2 =
if x1 <> x2 then
(test s false;
printfn "expected: %A, got %A" x2 x1)
let check s x1 x2 =
if x1 = x2 then test s true
else (test s false; printfn "expected: %A, got %A" x2 x1)
let rec async_syncLoopViaTailCallFail(n) = async {
if n > 10 then
let! res = failwith "fail"
return res
else
return! async_syncLoopViaTailCallFail(n+1)
}
let rec async_syncLoopViaNonTailCallFail(n) = async {
if n > 10 then
let! res = failwith "fail"
return Unchecked.defaultof<_>
else
let! n2 = async_syncLoopViaNonTailCallFail(n+1)
return n2
}
let rec async_syncWhileLoopFail() = async {
let mutable n = 0
while true do
if n > 10 then
let! res = failwith "fail"
return res
else
n <- n + 1
}
let rec async_syncTryFinallyFail() = async {
try
failwith "fail"
finally
()
}
// Raising an exception counts as an "asynchronous action" which wipes out the stack.
//
// This is because of a limitation in the .NET exception mechanism where stack traces are only populated
// up to the point where they are caught, so we need to catch them in the trampoline handler to get a good stack.
//
// This means that re-raising that exception (e.g. in a failed pattern match for a try-with)
// or throwing an exception from the "with" handler will not get a good stack.
// There is not yet any good workaround for this.
//
//let rec async_syncTryWithFail() = async {
// try
// failwith "fail"
// with _ -> ()
//}
let rec async_syncPreAsyncSleepFail() = async {
let! x = failwith "fail" // failure is in synchronous part of code
do! Async.Sleep 10
return Unchecked.defaultof<_>
}
let rec async_syncFail() = async {
failwith "fail"
}
let asyncCheckEnvironmentStackTracesBottom() = async {
let stack = System.Diagnostics.StackTrace(true).ToString()
//test "vwerv0re0reer: stack = %s", stack);
test "clncw09ew09c1" (stack.Contains("asyncCheckEnvironmentStackTracesBottom"))
test "clncw09ew09c2" (stack.Contains(string (int __LINE__ - 3)))
test "clncw09ew09d3" (stack.Contains("asyncCheckEnvironmentStackTracesMid"))
test "clncw09ew09e4" (stack.Contains("asyncCheckEnvironmentStackTracesTop"))
return 1
}
let asyncCheckEnvironmentStackTracesMid() = async {
let! res = asyncCheckEnvironmentStackTracesBottom()
let stack = System.Diagnostics.StackTrace(true).ToString()
test "clncw09ew09d2" (stack.Contains("asyncCheckEnvironmentStackTracesMid"))
test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2)))
test "clncw09ew09e2" (stack.Contains("asyncCheckEnvironmentStackTracesTop"))
return res
}
let asyncCheckEnvironmentStackTracesTop() = async {
let! res = asyncCheckEnvironmentStackTracesMid()
let stack = System.Diagnostics.StackTrace(true).ToString()
test "clncw09ew09f" (stack.Contains("asyncCheckEnvironmentStackTracesTop"))
test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2)))
do! Async.Sleep 10
let stack = System.Diagnostics.StackTrace(true).ToString()
test "clncw09ew09f" (stack.Contains("asyncCheckEnvironmentStackTracesTop"))
test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2)))
}
let asyncMid(f) = async {
let! res = f()
()
}
let asyncTop2(f) = async {
let! res = asyncMid(f)
return ()
}
let asyncTop3(f) = async {
do! Async.Sleep 10
let! res = asyncMid(f)
return ()
}
asyncCheckEnvironmentStackTracesTop() |> Async.RunSynchronously
let testCasesThatRaiseExceptions =
[ ("async_syncFail", async_syncFail)
("async_syncLoopViaTailCallFail", (fun () -> async_syncLoopViaTailCallFail(0)))
("async_syncLoopViaNonTailCallFail", (fun () -> async_syncLoopViaNonTailCallFail(0)))
("async_syncWhileLoopFail", async_syncWhileLoopFail)
("async_syncTryFinallyFail", async_syncTryFinallyFail)
("async_syncPreAsyncSleepFail", async_syncPreAsyncSleepFail) ]
for (asyncTopName, asyncTop) in [("asyncTop2", asyncTop2); ("asyncTop3", asyncTop3) ] do
for functionName, asyncFunction in testCasesThatRaiseExceptions do
try
asyncTop(asyncFunction) |> Async.RunSynchronously |> ignore
failwith "should have raised exception"
with e ->
let stack = e.StackTrace
test (sprintf "case %s: clncw09ew09m0" functionName) (not (stack.Contains("line 0")))
test (sprintf "case %s: clncw09ew09m1" functionName) (stack.Contains(functionName))
test (sprintf "case %s: clncw09ew09n2" functionName) (stack.Contains("asyncMid"))
test (sprintf "case %s: clncw09ew09n3" functionName) (stack.Contains(asyncTopName))
let aa =
if not failures.IsEmpty then
stdout.WriteLine "Test Failed"
exit 1
else
stdout.WriteLine "Test Passed"
System.IO.File.WriteAllText("test.ok","ok")
exit 0
......@@ -170,9 +170,7 @@ module CoreTests =
[<Test>]
let ``attributes-FSI_BASIC`` () = singleTestBuildAndRun "core/attributes" FSI_BASIC
#endif
#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS
[<Test>]
let byrefs () =
......@@ -189,6 +187,19 @@ module CoreTests =
fsi cfg "" ["test.fsx"]
testOkFile.CheckExists()
[<Test>]
let asyncStackTraces () =
let cfg = testConfig "core/asyncStackTraces"
use testOkFile = fileguard cfg "test.ok"
fsc cfg "%s -o:test.exe -g --tailcalls- --optimize-" cfg.fsc_flags ["test.fsx"]
exec cfg ("." ++ "test.exe") ""
testOkFile.CheckExists()
#endif
[<Test>]
......
......@@ -13,7 +13,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:4:3:0
}
.assembly AsyncExpressionSteppingTest1
{
......@@ -29,20 +29,20 @@
}
.mresource public FSharpSignatureData.AsyncExpressionSteppingTest1
{
// Offset: 0x00000000 Length: 0x0000024A
// Offset: 0x00000000 Length: 0x0000026C
}
.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest1
{
// Offset: 0x00000250 Length: 0x000000B1
// Offset: 0x00000270 Length: 0x000000B1
}
.module AsyncExpressionSteppingTest1.dll
// MVID: {5A1F62A7-6394-B5D4-A745-0383A7621F5A}
// MVID: {5AF5DDAE-6394-B5D4-A745-0383AEDDF55A}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x05190000
// Image base: 0x02880000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -83,7 +83,7 @@
// Code size 62 (0x3e)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 6,6 : 17,32 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest1.fs'
.line 6,6 : 17,32 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest1.fs'
IL_0000: ldstr "hello"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string)
IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
......
......@@ -13,7 +13,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:4:3:0
}
.assembly AsyncExpressionSteppingTest2
{
......@@ -29,20 +29,20 @@
}
.mresource public FSharpSignatureData.AsyncExpressionSteppingTest2
{
// Offset: 0x00000000 Length: 0x0000024A
// Offset: 0x00000000 Length: 0x0000026C
}
.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest2
{
// Offset: 0x00000250 Length: 0x000000B1
// Offset: 0x00000270 Length: 0x000000B1
}
.module AsyncExpressionSteppingTest2.dll
// MVID: {5A1F62A7-6394-D499-A745-0383A7621F5A}
// MVID: {5AF5DDAE-6394-D499-A745-0383AEDDF55A}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x00F10000
// Image base: 0x04520000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -80,7 +80,7 @@
// Code size 15 (0xf)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 6,6 : 23,29 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs'
.line 6,6 : 23,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs'
IL_0000: ldarg.0
IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x
IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<!!0>)
......
......@@ -13,7 +13,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:4:3:0
}
.assembly AsyncExpressionSteppingTest3
{
......@@ -29,20 +29,20 @@
}
.mresource public FSharpSignatureData.AsyncExpressionSteppingTest3
{
// Offset: 0x00000000 Length: 0x00000255
// Offset: 0x00000000 Length: 0x00000277
}
.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest3
{
// Offset: 0x00000260 Length: 0x000000B1
// Offset: 0x00000280 Length: 0x000000B1
}
.module AsyncExpressionSteppingTest3.dll
// MVID: {5A1F62A7-6394-F35E-A745-0383A7621F5A}
// MVID: {5AF5DDAE-6394-F35E-A745-0383AEDDF55A}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x01210000
// Image base: 0x04650000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -55,6 +55,44 @@
extends [mscorlib]System.Object
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
.class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>
{
.field public int32 'value'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method assembly specialname rtspecialname
instance void .ctor(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::'value'
IL_000d: ret
} // end of method 'f3@10-1'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn
Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32> ctxt) cil managed
{
// Code size 14 (0xe)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 10,10 : 17,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.fs'
IL_0000: ldarga.s ctxt
IL_0002: ldarg.0
IL_0003: ldfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::'value'
IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>::OnSuccess(!0)
IL_000d: ret
} // end of method 'f3@10-1'::Invoke
} // end of class 'f3@10-1'
.class auto ansi serializable sealed nested assembly beforefieldinit f3@5
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>>
{
......@@ -80,13 +118,14 @@
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
{
// Code size 57 (0x39)
// Code size 67 (0x43)
.maxstack 6
.locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> x,
[1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> y,
[2] int32 z)
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 5,5 : 17,30 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.fs'
[2] int32 z,
[3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3,
[4] int32 V_4)
.line 5,5 : 17,30 ''
IL_0000: ldc.i4.0
IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<!!0> [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref<int32>(!!0)
IL_0006: stloc.0
......@@ -112,10 +151,14 @@
.line 10,10 : 17,25 ''
IL_002a: ldarg.0
IL_002b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@
IL_0030: ldloc.2
IL_0031: tail.
IL_0033: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return<int32>(!!0)
IL_0038: ret
IL_0030: stloc.3
IL_0031: ldloc.2
IL_0032: stloc.s V_4
IL_0034: ldloc.s V_4
IL_0036: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::.ctor(int32)
IL_003b: tail.
IL_003d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>)
IL_0042: ret
} // end of method f3@5::Invoke
} // end of class f3@5
......
......@@ -13,7 +13,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:4:3:0
}
.assembly AsyncExpressionSteppingTest4
{
......@@ -29,20 +29,20 @@
}
.mresource public FSharpSignatureData.AsyncExpressionSteppingTest4
{
// Offset: 0x00000000 Length: 0x00000255
// Offset: 0x00000000 Length: 0x00000277
}
.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest4
{
// Offset: 0x00000260 Length: 0x000000B1
// Offset: 0x00000280 Length: 0x000000B1
}
.module AsyncExpressionSteppingTest4.dll
// MVID: {5A1F62A7-6394-6D4B-A745-0383A7621F5A}
// MVID: {5AF5DDAE-6394-6D4B-A745-0383AEDDF55A}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x038C0000
// Image base: 0x028F0000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -55,6 +55,44 @@
extends [mscorlib]System.Object
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
.class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>
{
.field public int32 'value'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method assembly specialname rtspecialname
instance void .ctor(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::'value'
IL_000d: ret
} // end of method 'f4@10-2'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn
Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32> ctxt) cil managed
{
// Code size 14 (0xe)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 10,10 : 21,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs'
IL_0000: ldarga.s ctxt
IL_0002: ldarg.0
IL_0003: ldfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::'value'
IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>::OnSuccess(!0)
IL_000d: ret
} // end of method 'f4@10-2'::Invoke
} // end of class 'f4@10-2'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f4@7-1'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>>
{
......@@ -85,12 +123,13 @@
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
{
// Code size 48 (0x30)
// Code size 56 (0x38)
.maxstack 6
.locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> y,
[1] int32 z)
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 7,7 : 21,34 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs'
[1] int32 z,
[2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2,
[3] int32 V_3)
.line 7,7 : 21,34 ''
IL_0000: ldc.i4.0
IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<!!0> [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref<int32>(!!0)
IL_0006: stloc.0
......@@ -109,15 +148,19 @@
.line 10,10 : 21,29 ''
IL_0021: ldarg.0
IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@
IL_0027: ldloc.1
IL_0028: tail.
IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return<int32>(!!0)
IL_002f: ret
IL_0027: stloc.2
IL_0028: ldloc.1
IL_0029: stloc.3
IL_002a: ldloc.3
IL_002b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32)
IL_0030: tail.
IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>)
IL_0037: ret
} // end of method 'f4@7-1'::Invoke
} // end of class 'f4@7-1'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-2'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
{
.field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> x
......@@ -132,9 +175,9 @@
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::x
IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x
IL_000d: ret
} // end of method 'f4@12-2'::.ctor
} // end of method 'f4@12-3'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
......@@ -143,7 +186,7 @@
.maxstack 8
.line 12,12 : 20,26 ''
IL_0000: ldarg.0
IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::x
IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x
IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32>)
IL_000b: nop
.line 13,13 : 20,34 ''
......@@ -152,9 +195,59 @@
IL_0016: tail.
IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_001d: ret
} // end of method 'f4@12-2'::Invoke
} // end of method 'f4@12-3'::Invoke
} // end of class 'f4@12-2'
} // end of class 'f4@12-3'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>
{
.field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32> computation
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> compensation
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method assembly specialname rtspecialname
instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32> computation,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> compensation) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation
IL_0014: ret
} // end of method 'f4@6-4'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn
Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<int32> ctxt) cil managed
{
// Code size 21 (0x15)
.maxstack 8
.line 6,6 : 17,20 ''
IL_0000: ldarg.1
IL_0001: ldarg.0
IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation
IL_0007: ldarg.0
IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation
IL_000d: tail.
IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally<int32>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,
class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_0014: ret
} // end of method 'f4@6-4'::Invoke
} // end of class 'f4@6-4'
.class auto ansi serializable sealed nested assembly beforefieldinit f4@5
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>>
......@@ -181,9 +274,12 @@
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
{
// Code size 50 (0x32)
.maxstack 8
.locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> x)
// Code size 60 (0x3c)
.maxstack 7
.locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32> x,
[1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1,
[2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32> V_2,
[3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3)
.line 5,5 : 17,30 ''
IL_0000: ldc.i4.0
IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<!!0> [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref<int32>(!!0)
......@@ -191,20 +287,26 @@
.line 6,6 : 17,20 ''
IL_0007: ldarg.0
IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@
IL_000d: ldarg.0
IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@
IL_0013: ldarg.0
IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@
IL_0019: ldloc.0
IL_001a: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder,
IL_000d: stloc.1
IL_000e: ldarg.0
IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@
IL_0014: ldarg.0
IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@
IL_001a: ldloc.0
IL_001b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32>)
IL_001f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>>)
IL_0024: ldloc.0
IL_0025: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32>)
IL_002a: tail.
IL_002c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::TryFinally<int32>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_0031: ret
IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>>)
IL_0025: stloc.2
IL_0026: ldloc.0
IL_0027: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1<int32>)
IL_002c: stloc.3
IL_002d: ldloc.2
IL_002e: ldloc.3
IL_002f: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<int32>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_0034: tail.
IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>)
IL_003b: ret
} // end of method f4@5::Invoke
} // end of class f4@5
......
......@@ -13,7 +13,7 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:4:3:0
}
.assembly AsyncExpressionSteppingTest5
{
......@@ -29,20 +29,20 @@
}
.mresource public FSharpSignatureData.AsyncExpressionSteppingTest5
{
// Offset: 0x00000000 Length: 0x00000296
// Offset: 0x00000000 Length: 0x000002B8
}
.mresource public FSharpOptimizationData.AsyncExpressionSteppingTest5
{
// Offset: 0x000002A0 Length: 0x000000BE
// Offset: 0x000002C0 Length: 0x000000BE
}
.module AsyncExpressionSteppingTest5.dll
// MVID: {5A1F62A7-6394-30E8-A745-0383A7621F5A}
// MVID: {5AF5DDAE-6394-30E8-A745-0383AEDDF55A}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x00C60000
// Image base: 0x04430000
// =============== CLASS MEMBERS DECLARATION ===================
......@@ -84,7 +84,7 @@
.maxstack 5
.locals init ([0] int32 x)
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 6,6 : 17,31 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs'
.line 6,6 : 17,31 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs'
IL_0000: ldarg.1
IL_0001: stloc.0
.line 7,7 : 20,35 ''
......@@ -198,6 +198,91 @@
} // end of class 'f7@9-2'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
{
.field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> computation2
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method assembly specialname rtspecialname
instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> computation2) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2
IL_000d: ret
} // end of method 'f7@6-4'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed
{
// Code size 7 (0x7)
.maxstack 8
.line 6,6 : 17,31 ''
IL_0000: ldarg.0
IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2
IL_0006: ret
} // end of method 'f7@6-4'::Invoke
} // end of class 'f7@6-4'
.class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5'
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>
{
.field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> computation1
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>> part2
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
.method assembly specialname rtspecialname
instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> computation1,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>> part2) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2
IL_0014: ret
} // end of method 'f7@6-5'::.ctor
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn
Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> ctxt) cil managed
{
// Code size 21 (0x15)
.maxstack 8
.line 6,6 : 17,31 ''
IL_0000: ldarg.1
IL_0001: ldarg.0
IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1
IL_0007: ldarg.0
IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2
IL_000d: tail.
IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,
class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!1>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!1,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>>)
IL_0014: ret
} // end of method 'f7@6-5'::Invoke
} // end of class 'f7@6-5'
.class auto ansi serializable sealed nested assembly beforefieldinit f7@6
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
{
......@@ -223,29 +308,42 @@
.method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
{
// Code size 63 (0x3f)
.maxstack 8
// Code size 80 (0x50)
.maxstack 7
.locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0,
[1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1,
[2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_2,
[3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>> V_3)
.line 6,6 : 17,31 ''
IL_0000: ldarg.0
IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_0006: ldarg.0
IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<int32> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es()
IL_0011: ldarg.0
IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_0017: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder)
IL_001c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For<int32>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
IL_0006: stloc.0
IL_0007: ldarg.0
IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<int32> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es()
IL_0012: ldarg.0
IL_0013: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_0018: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder)
IL_001d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For<int32>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!0,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>>)
IL_0021: ldarg.0
IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_0027: ldarg.0
IL_0028: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_002d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder)
IL_0032: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>>)
IL_0037: tail.
IL_0039: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Combine<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,
class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>)
IL_003e: ret
IL_0022: stloc.1
IL_0023: ldarg.0
IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_0029: ldarg.0
IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@
IL_002f: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder)
IL_0034: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0>>)
IL_0039: stloc.2
IL_003a: ldloc.2
IL_003b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
IL_0040: stloc.3
IL_0041: ldloc.1
IL_0042: ldloc.3
IL_0043: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>>)
IL_0048: tail.
IL_004a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>)
IL_004f: ret
} // end of method f7@6::Invoke
} // end of class f7@6
......
//<Expects id="FS0366" status="error">No implementation was given for</Expects>
open System
open System.IO
type IFoo =
abstract member Foo : t:Type * r:TextReader -> obj
abstract member Foo<'t> : TextReader -> 't
type Foo() =
interface IFoo with
member x.Foo(t, reader) = obj()
exit 1
......@@ -29,6 +29,7 @@ NOMONO,NoMT SOURCE=ConsumeOverloadGenericMethods.fs SCFLAGS="-r:lib.dll" PRECMD=
SOURCE=SlowOverloadResolution.fs # SlowOverloadResolution.fs
SOURCE=E_OverloadCurriedFunc.fs # E_OverloadCurriedFunc.fs
SOURCE=E_OverloadMismatch.fs # E_OverloadMismatch.fs
SOURCE=NoWarningWhenOverloadingInSubClass01.fs SCFLAGS="--warnaserror" # NoWarningWhenOverloadingInSubClass01.fs
SOURCE=E_UnsolvableConstraints01.fs SCFLAGS="--test:ErrorRanges" # E_UnsolvableConstraints01.fs
......
......@@ -2287,6 +2287,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T)
Microsoft.FSharp.Core.Operators: T Cos[T](T)
Microsoft.FSharp.Core.Operators: T Cosh[T](T)
Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T)
Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T)
Microsoft.FSharp.Core.Operators: T Exit[T](Int32)
Microsoft.FSharp.Core.Operators: T Exp[T](T)
Microsoft.FSharp.Core.Operators: T FailWith[T](System.String)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册