File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
tests/FSharp.Compiler.Private.Scripting.UnitTests Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2148,6 +2148,7 @@ and typeDefReader ctxtH : ILTypeDefStored =
21482148 ctxt.fileName.EndsWith( " System.Runtime.dll" )
21492149 || ctxt.fileName.EndsWith( " mscorlib.dll" )
21502150 || ctxt.fileName.EndsWith( " netstandard.dll" )
2151+ || ctxt.fileName.EndsWith( " System.Private.CoreLib.dll" )
21512152
21522153 while attrIdx <= attrsEndIdx && not containsExtensionMethods do
21532154 let mutable addr = ctxt.rowAddr TableNames.CustomAttribute attrIdx
Original file line number Diff line number Diff line change @@ -352,6 +352,22 @@ tInput.Length
352352 let value = opt.Value
353353 Assert.Equal( 4 L, downcast value.ReflectionValue)
354354
355+ [<Fact>]
356+ member _. ``ML - use assembly with ref dependencies and without refing SMemory`` () =
357+ let code = """
358+ #r "nuget:Microsoft.ML.OnnxTransformer,1.4.0"
359+
360+ open System
361+ open System.Numerics.Tensors
362+ let inputValues = [| 12.0; 10.0; 17.0; 5.0 |]
363+ let tInput = new DenseTensor<float>(inputValues.AsMemory(), new ReadOnlySpan<int>([|4|]))
364+ tInput.Length
365+ """
366+ use script = new FSharpScript( additionalArgs=[| " /usesdkrefs-" |])
367+ let opt = script.Eval( code) |> getValue
368+ let value = opt.Value
369+ Assert.Equal( 4 L, downcast value.ReflectionValue)
370+
355371 [<Fact>]
356372 member _. ``System.Device.Gpio - Ensure we reference the runtime version of the assembly`` () =
357373 let code = """
You can’t perform that action at this time.
0 commit comments