Skip to content

Commit 3a4066c

Browse files
authored
Merge pull request #9884 from dotnet/merges/master-to-feature/string-interp
Merge master to feature/string-interp
2 parents 6af4caf + a265343 commit 3a4066c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

tests/FSharp.Compiler.ComponentTests/Language/CodeQuotationTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ let z : unit =
3636
failwithf "did not expect expression for 'z': %A" e
3737
"""
3838
|> asExe
39-
|> withOptions ["--langversion:preview"]
39+
|> withPreview
4040
|> compileAndRun
4141
|> shouldSucceed

tests/FSharp.Test.Utilities/Compiler.fs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ module rec Compiler =
176176
| FS fs -> FS { fs with Options = options }
177177
| _ -> failwith "withOptions is only supported n F#"
178178

179+
let withPreview (cUnit: CompilationUnit) : CompilationUnit =
180+
match cUnit with
181+
| FS fs -> FS { fs with Options = [ "--langversion:preview" ] }
182+
| _ -> failwith "withPreview is only supported in F#"
183+
179184
let asLibrary (cUnit: CompilationUnit) : CompilationUnit =
180185
match cUnit with
181186
| FS fs -> FS { fs with OutputType = CompileOutput.Library }

tests/fsharp/Compiler/Language/WitnessTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module WitnessTests =
1919
""" (dir ++ "provider.fsx"))
2020
|> asExe
2121
|> ignoreWarnings
22-
|> withOptions ["--langversion:preview"]
22+
|> withPreview
2323
|> compile
2424
|> shouldSucceed
2525
|> ignore

0 commit comments

Comments
 (0)