diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md index 786a741dbfa..a0fb7f9b951 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md @@ -11,6 +11,7 @@ * `[]` member should not produce property symbol. ([Issue #16640](https://github.com/dotnet/fsharp/issues/16640), [PR #16658](https://github.com/dotnet/fsharp/pull/16658)) * Fix discriminated union initialization. ([#PR 16661](https://github.com/dotnet/fsharp/pull/16661)) * Allow calling method with both Optional and ParamArray. ([#PR 16688](https://github.com/dotnet/fsharp/pull/16688), [suggestions #1120](https://github.com/fsharp/fslang-suggestions/issues/1120)) +* Fix release inline optimization, which leads to MethodAccessException if used with `assembly:InternalsVisibleTo`` attribute. ([Issue #16105](https://github.com/dotnet/fsharp/issues/16105), ([PR #16737](https://github.com/dotnet/fsharp/pull/16737)) * Enforce AttributeTargets on let values and functions. ([PR #16692](https://github.com/dotnet/fsharp/pull/16692)) ### Added diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index fd3c85dd60b..afdc0616505 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -496,7 +496,7 @@ let rec IsPartialExprVal x = | TupleValue args | RecdValue (_, args) | UnionCaseValue (_, args) -> Array.exists IsPartialExprVal args | ConstValue _ | CurriedLambdaValue _ | ConstExprValue _ -> false | ValValue (_, a) - | SizeValue(_, a) -> IsPartialExprVal a + | SizeValue (_, a) -> IsPartialExprVal a let CheckInlineValueIsComplete (v: Val) res = if v.MustInline && IsPartialExprVal res then @@ -690,10 +690,25 @@ let GetInfoForVal cenv env m (vref: ValRef) = GetInfoForLocalValue cenv env vref.binding m else GetInfoForNonLocalVal cenv env vref + res +let GetInfoForValWithCheck cenv env m (vref: ValRef) = + let res = GetInfoForVal cenv env m vref check vref res |> ignore res +let IsPartialExpr cenv env m x = + let rec isPartialExpression x = + match x with + | Expr.App (func, _, _, args, _) -> func :: args |> Seq.exists isPartialExpression + | Expr.Lambda (_, _, _, _, expr, _, _) -> expr |> isPartialExpression + | Expr.Let (TBind (_,expr,_), body, _, _) -> expr :: [body] |> List.exists isPartialExpression + | Expr.LetRec (bindings, body, _, _) -> body :: (bindings |> List.map (fun (TBind (_,expr,_)) -> expr)) |> List.exists isPartialExpression + | Expr.Sequential (expr1, expr2, _, _) -> [expr1; expr2] |> Seq.exists isPartialExpression + | Expr.Val (vr, _, _) when not vr.IsLocalRef -> ((GetInfoForVal cenv env m vr).ValExprInfo) |> IsPartialExprVal + | _ -> false + isPartialExpression x + //------------------------------------------------------------------------- // Try to get information about values of particular types //------------------------------------------------------------------------- @@ -3062,11 +3077,14 @@ and TryOptimizeVal cenv env (vOpt: ValRef option, mustInline, inlineIfLambda, va failwith "tuple, union and record values cannot be marked 'inline'" | UnknownValue when mustInline -> - warning(Error(FSComp.SR.optValueMarkedInlineHasUnexpectedValue(), m)); None + warning(Error(FSComp.SR.optValueMarkedInlineHasUnexpectedValue(), m)) + None | _ when mustInline -> - warning(Error(FSComp.SR.optValueMarkedInlineCouldNotBeInlined(), m)); None - | _ -> None + warning(Error(FSComp.SR.optValueMarkedInlineCouldNotBeInlined(), m)) + None + + | _ -> None and TryOptimizeValInfo cenv env m vinfo = if vinfo.HasEffect then None else TryOptimizeVal cenv env (None, false, false, vinfo.Info, m) @@ -3089,7 +3107,7 @@ and OptimizeVal cenv env expr (v: ValRef, m) = let g = cenv.g - let valInfoForVal = GetInfoForVal cenv env m v + let valInfoForVal = GetInfoForValWithCheck cenv env m v match TryOptimizeVal cenv env (Some v, v.MustInline, v.InlineIfLambda, valInfoForVal.ValExprInfo, m) with | Some e -> @@ -3402,7 +3420,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) | _ -> false | _ -> false | _ -> false - | _ -> false + | _ -> false if isValFromLazyExtensions then None else @@ -3410,7 +3428,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) match finfo.Info with | ValValue(vref, _) -> vref.Attribs |> List.exists (fun a -> (IsSecurityAttribute g cenv.amap cenv.casApplied a m) || (IsSecurityCriticalAttribute g a)) - | _ -> false + | _ -> false if isSecureMethod then None else @@ -3421,6 +3439,13 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) if isGetHashCode then None else + let isApplicationPartialExpr = + match finfo.Info with + | ValValue (_, CurriedLambdaValue (_, _, _, expr, _) ) -> IsPartialExpr cenv env m expr + | _ -> false + + if isApplicationPartialExpr then None else + // Inlining lambda let f2R = CopyExprForInlining cenv false f2 m @@ -3597,8 +3622,8 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = // This includes recursive calls to the function being defined (in which case we get a non-critical, closed-world tailcall). // Note we also have to check the argument count to ensure this is a direct call (or a partial application). let doesNotMakeCriticalTailcall = - vref.MakesNoCriticalTailcalls || - (let valInfoForVal = GetInfoForVal cenv env m vref in valInfoForVal.ValMakesNoCriticalTailcalls) || + vref.MakesNoCriticalTailcalls || + (let valInfoForVal = GetInfoForValWithCheck cenv env m vref in valInfoForVal.ValMakesNoCriticalTailcalls) || (match env.functionVal with | None -> false | Some (v, _) -> valEq vref.Deref v) if doesNotMakeCriticalTailcall then let numArgs = otherArgs.Length + newArgs.Length diff --git a/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs b/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs index ffd7336997a..767d1f75670 100644 --- a/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs +++ b/tests/FSharp.Compiler.ComponentTests/Debugger/PortablePdbs.fs @@ -74,9 +74,7 @@ module Baz = Line 16, Col 20, Line 16, Col 22 Line 21, Col 20, Line 21, Col 22 ] - VerifyDocuments [ - Path.Combine(Environment.CurrentDirectory, "test.fs") - ] + VerifyDocuments [ "test.fs" ] ] [] @@ -100,9 +98,4 @@ module M = |> withPortablePdb |> compile |> shouldSucceed - |> verifyPdb [ - VerifyDocuments [ - Path.Combine(Environment.CurrentDirectory, "test.fsi") - Path.Combine(Environment.CurrentDirectory, "test.fs") - ] - ] + |> verifyPdb [ VerifyDocuments [ "test.fsi"; "test.fs" ] ] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/NoCompilerInlining.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/NoCompilerInlining.fs index b798d155209..f9be4e7def9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/NoCompilerInlining.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/NoCompilerInlining.fs @@ -5,7 +5,319 @@ namespace EmittedIL open Xunit open FSharp.Test.Compiler -module ``NoCompilerInlining`` = +module NoCompilerInlining = + + [] + let ``Inline nested binding using internal value not available for cross module inlining``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module internal OuterModule + open System.Runtime.CompilerServices + + [] + do () + + let helloWorld = "Hello World" + let sayOuterModuleHello (msg:string) = System.Console.WriteLine(msg) """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = + let msg = OuterModule.helloWorld + OuterModule.sayOuterModuleHello(msg)""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void [middleModule]MiddleModule::sayMiddleModuleHello() + IL_0005: ret + } +""" ] + + [] + let ``Methods marked internal not available for cross module inlining``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module internal OuterModule + open System.Runtime.CompilerServices + + [] + do () + + let sayOuterModuleHello () = System.Console.WriteLine("Hello World") """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = OuterModule.sayOuterModuleHello()""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void [middleModule]MiddleModule::sayMiddleModuleHello() + IL_0005: ret + } +""" ] + + [] + let ``Methods marked internal not available for cross module inlining 2``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module public OuterModule + open System.Runtime.CompilerServices + + [] + do () + + let sayOuterModuleHello () = System.Console.WriteLine("Hello World") """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = + let x = 1 + let y = 2 + System.Console.WriteLine("x + y: {0} + {1} = ", x, y) + OuterModule.sayOuterModuleHello()""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ldstr "x + y: {0} + {1} = " + IL_0005: ldc.i4.1 + IL_0006: box [runtime]System.Int32 + IL_000b: ldc.i4.2 + IL_000c: box [runtime]System.Int32 + IL_0011: call void [runtime]System.Console::WriteLine(string, + object, + object) + IL_0016: ldstr "Hello World" + IL_001b: call void [runtime]System.Console::WriteLine(string) + IL_0020: ret + } +""" ] + + + [] + let ``Methods marked public available for cross module inlining``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module OuterModule + open System.Runtime.CompilerServices + + let sayOuterModuleHello () = System.Console.WriteLine("Hello World") """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = OuterModule.sayOuterModuleHello()""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ldstr "Hello World" + IL_0005: call void [runtime]System.Console::WriteLine(string) + IL_000a: ret + } +""" ] + + + [] + let ``Nested Module marked internal not available for cross module inlining``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module OuterModule + open System.Runtime.CompilerServices + + [] + do () + + module internal nestedModule = + let sayNestedModuleHello () = System.Console.WriteLine("Hello World") + + let sayOuterModuleHello () = nestedModule.sayNestedModuleHello () """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = OuterModule.sayOuterModuleHello()""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ldstr "Hello World" + IL_0005: call void [runtime]System.Console::WriteLine(string) + IL_000a: ret + } +""" ] + + [] + let ``Nested Module marked public available for cross module inlining``() = + + let outerModule = + FSharpWithFileName + "outerModule.fs" + """ +module OuterModule + open System.Runtime.CompilerServices + + module nestedModule = + let sayNestedModuleHello () = System.Console.WriteLine("Hello World") + + let sayOuterModuleHello () = nestedModule.sayNestedModuleHello () """ + |> withOptimize + |> asLibrary + |> withName "outerLibrary" + + let middleModule = + FSharpWithFileName + "middleModule.fs" + """ +module MiddleModule + let sayMiddleModuleHello () = OuterModule.sayOuterModuleHello()""" + |> withOptimize + |> withReferences [outerModule] + |> asLibrary + |> withName "middleModule" + + FSharpWithFileName + "program.fs" + """MiddleModule.sayMiddleModuleHello()""" + |> withOptimize + |> withReferences [middleModule; outerModule] + |> withName "Program" + |> compileExeAndRun + |> shouldSucceed + |> verifyIL [ """ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ldstr "Hello World" + IL_0005: call void [runtime]System.Console::WriteLine(string) + IL_000a: ret + } +""" ] + + + [] let ``Function marked with NoCompilerInlining is not inlined by the compiler``() = FSharp """ diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs index fe178ad1975..eefb9cf7a98 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowingTests.fs @@ -1,9 +1,9 @@ -module FSharp.Compiler.ComponentTests.TypeChecks.TypeExtensions.PropertyShadowingTests +module FSharp.Compiler.ComponentTests.TypeChecks.TypeExtensions.Shadowing open Xunit open FSharp.Test open FSharp.Test.Compiler -let [] folder = __SOURCE_DIRECTORY__ + "/PropertyShadowing" +let [] folder = __SOURCE_DIRECTORY__ + "/Shadowing" [] folder = __SOURCE_DIRECTORY__ + "/PropertyShadowing" "ShadowWithLastOpenedTypeExtensions.fsx" |] )>] -let ``can hide property`` compilation = +let PropertyHidding compilation = compilation |> asFsx |> withOptions ["--langversion:preview"] @@ -38,7 +38,7 @@ let ``can hide property`` compilation = |] , BaselineSuffix = ".support.added.later" )>] -let ``cannot hide property v7.0 support added later`` compilation = +let ``PropertyHiding v7.0`` compilation = compilation |> asFsx |> withOptions ["--langversion:7.0"] @@ -57,7 +57,7 @@ let ``cannot hide property v7.0 support added later`` compilation = "E_NoChangeForEvent.fsx" |] )>] -let ``cannot hide property`` compilation = +let ``PropertyHiding fails`` compilation = compilation |> asFsx |> withOptions ["--langversion:preview"] @@ -77,7 +77,7 @@ let ``cannot hide property`` compilation = "E_NoChangeForEvent.fsx" |] )>] -let ``cannot hide property v7.0`` compilation = +let ``PropertyHidingFails v7.0`` compilation = compilation |> asFsx |> withOptions ["--langversion:7.0"] diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithExtensionMethod.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowFunctionPropertyWithTypeExtension.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithExtensionMethod.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_CannotShadowIndexedPropertyWithTypeExtension.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/E_NoChangeForEvent.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/E_NoChangeForEvent.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/LinqCount.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/LinqCount.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowStaticProperty.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowStaticProperty.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithExtensionMethod.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithExtensionMethod.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl similarity index 79% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl index 2244a998dae..a0e89588014 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.il.bsl @@ -45,8 +45,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field static assembly int32 x .field static assembly int32 init@4 - .method assembly specialname rtspecialname - instance void .ctor() cil managed + .method assembly specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 @@ -57,8 +56,7 @@ IL_0008: ret } - .method public specialname static int32 - get_X() cil managed + .method public specialname static int32 get_X() cil managed { .maxstack 8 @@ -74,8 +72,7 @@ IL_0016: ret } - .method public specialname static void - set_X(int32 v) cil managed + .method public specialname static void set_X(int32 v) cil managed { .maxstack 8 @@ -92,8 +89,7 @@ IL_0017: ret } - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -118,8 +114,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed + .method assembly specialname rtspecialname instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -133,8 +128,7 @@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed { .maxstack 8 @@ -156,8 +150,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed + .method assembly specialname rtspecialname instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -171,8 +164,7 @@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed { .maxstack 8 @@ -191,8 +183,7 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { .field static assembly initonly class assembly/todo1@18 @_instance - .method assembly specialname rtspecialname - instance void .ctor() cil managed + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -203,8 +194,7 @@ IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { .maxstack 6 @@ -234,8 +224,7 @@ IL_0037: ret } - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 @@ -253,8 +242,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed + .method assembly specialname rtspecialname instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -268,8 +256,7 @@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed { .maxstack 8 @@ -291,8 +278,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed + .method assembly specialname rtspecialname instance void .ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -306,8 +292,7 @@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1> ctxt) cil managed { .maxstack 8 @@ -326,8 +311,7 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { .field static assembly initonly class assembly/todo2@37 @_instance - .method assembly specialname rtspecialname - instance void .ctor() cil managed + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -338,8 +322,7 @@ IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { .maxstack 6 @@ -369,8 +352,7 @@ IL_0037: ret } - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 @@ -413,8 +395,7 @@ } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> - get_todo1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo1() cil managed { .maxstack 8 @@ -422,8 +403,7 @@ IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 - get_matchValue@25() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 get_matchValue@25() cil managed { .maxstack 8 @@ -431,8 +411,15 @@ IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> - get_todo2() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_computation@25() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::computation@25 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed { .maxstack 8 @@ -440,8 +427,7 @@ IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 - 'get_matchValue@44-1'() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'get_matchValue@44-1'() cil managed { .maxstack 8 @@ -449,6 +435,14 @@ IL_0005: ret } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'get_computation@44-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::'computation@44-1' + IL_0005: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> todo1() { @@ -461,6 +455,12 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) .get valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::get_matchValue@25() } + .property class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> + computation@25() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::get_computation@25() + } .property class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> todo2() { @@ -473,6 +473,12 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) .get valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::'get_matchValue@44-1'() } + .property class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> + 'computation@44-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::'get_computation@44-1'() + } } .class private abstract auto ansi sealed ''.$assembly$fsx @@ -482,16 +488,19 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly initonly valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 matchValue@25 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> computation@25 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly initonly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> todo2@35 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly initonly valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'matchValue@44-1' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'computation@44-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 5 @@ -505,48 +514,52 @@ IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_001d: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo1@16 IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::get_todo1() - IL_0027: ldnull - IL_0028: ldnull - IL_0029: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0027: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::computation@25 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::get_computation@25() + IL_0031: ldnull + IL_0032: ldnull + IL_0033: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) - IL_002e: stsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 - IL_0033: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 - IL_0038: call instance int32 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_Tag() - IL_003d: ldc.i4.1 - IL_003e: bne.un.s IL_0042 - - IL_0040: br.s IL_0044 - - IL_0042: br.s IL_0053 - - IL_0044: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 - IL_0049: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() - IL_004e: call void [runtime]System.Environment::Exit(int32) - IL_0053: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0058: ldsfld class assembly/todo2@37 assembly/todo2@37::@_instance - IL_005d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0062: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo2@35 - IL_0067: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::get_todo2() - IL_006c: ldnull - IL_006d: ldnull - IL_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0038: stsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 + IL_003d: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 + IL_0042: call instance int32 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_Tag() + IL_0047: ldc.i4.1 + IL_0048: bne.un.s IL_004c + + IL_004a: br.s IL_004e + + IL_004c: br.s IL_005d + + IL_004e: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 + IL_0053: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() + IL_0058: call void [runtime]System.Environment::Exit(int32) + IL_005d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0062: ldsfld class assembly/todo2@37 assembly/todo2@37::@_instance + IL_0067: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_006c: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo2@35 + IL_0071: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::get_todo2() + IL_0076: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::'computation@44-1' + IL_007b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::'get_computation@44-1'() + IL_0080: ldnull + IL_0081: ldnull + IL_0082: call !!0 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync::RunSynchronously>(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1) - IL_0073: stsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' - IL_0078: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' - IL_007d: call instance int32 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_Tag() - IL_0082: ldc.i4.1 - IL_0083: bne.un.s IL_0087 + IL_0087: stsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' + IL_008c: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' + IL_0091: call instance int32 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_Tag() + IL_0096: ldc.i4.1 + IL_0097: bne.un.s IL_009b - IL_0085: br.s IL_0089 + IL_0099: br.s IL_009d - IL_0087: br.s IL_0098 + IL_009b: br.s IL_00ac - IL_0089: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' - IL_008e: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() - IL_0093: call void [runtime]System.Environment::Exit(int32) - IL_0098: ret + IL_009d: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' + IL_00a2: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() + IL_00a7: call void [runtime]System.Environment::Exit(int32) + IL_00ac: ret } } @@ -555,3 +568,4 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowWithTypeExtension.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowWithTypeExtension.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.err.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.err.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.err.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.err.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/PropertyShadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.il.bsl rename to tests/FSharp.Compiler.ComponentTests/TypeChecks/TypeExtensions/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.support.added.later.il.bsl diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index c29d0958801..0f79fbcbad8 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -366,6 +366,10 @@ module rec Compiler = let FSharp (source: string) : CompilationUnit = Fs source + let FSharpWithFileName name (source: string) : CompilationUnit = + fsFromString (SourceCodeFileKind.Fs({FileName=name; SourceText=Some source })) + |> FS + let FsFromPath (path: string) : CompilationUnit = fsFromString (SourceFromPath path) |> FS @@ -1362,12 +1366,13 @@ Actual: if documents <> expectedDocuments then failwith $"Expected documents are different from PDB.\nExpected: %A{expectedDocuments}\nActual: %A{documents}" - let private verifyPdbOptions reader options = + let private verifyPdbOptions optOutputPath reader options = + let outputPath = Path.GetDirectoryName(optOutputPath |> Option.defaultValue ".") for option in options do match option with | VerifyImportScopes scopes -> verifyPdbImportTables reader scopes | VerifySequencePoints sp -> verifySequencePoints reader sp - | VerifyDocuments docs -> verifyDocuments reader docs + | VerifyDocuments docs -> verifyDocuments reader (docs |> List.map(fun doc -> Path.Combine(outputPath, doc))) | _ -> failwith $"Unknown verification option: {option.ToString()}" let private verifyPortablePdb (result: CompilationOutput) options : unit = @@ -1386,7 +1391,7 @@ Actual: | _ -> failwith "Only F# compilations are supported when verifying PDBs." verifyPdbFormat reader compilationType - verifyPdbOptions reader options + verifyPdbOptions result.OutputPath reader options | _ -> failwith "Output path is not set, please make sure compilation was successfull." () diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index e7d56f247dd..a97b214acde 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -439,9 +439,10 @@ module rec CompilerAssertHelpers = | Some text -> // In memory source file copy it to the build directory let source = item.ChangeExtension - File.WriteAllText (source.GetSourceFileName, text) - disposals.Add(disposeFile source.GetSourceFileName) - yield source + let destFileName = Path.Combine(outputDirectory.FullName, Path.GetFileName(source.GetSourceFileName)) + File.WriteAllText (destFileName, text) + disposals.Add(disposeFile destFileName) + yield source.WithFileName(destFileName) | None -> // On Disk file let sourceFileName = item.GetSourceFileName