Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit877aed4

Browse files
authored
Fixdotnet#2308 -- Struct tuples do not work in FSI / VS FSI (dotnet#2309)
*Fixdotnet#2308 -- Struct tuples do not work in FSI / VS FSI* add test* Make new test work on coreclr* Add fsc_basic struct tuple test* Fix typo in name, correct build tests-coreclr-fsharp
1 parentd921725 commit877aed4

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

‎build.cmd‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ if /i '%ARG%' == 'test-net40-fsharp' (
319319

320320
if /i '%ARG%'== 'test-coreclr-fsharp' (
321321
setBUILD_NET40=1
322+
setBUILD_PROTO_WITH_CORECLR_LKG=1
322323
setBUILD_CORECLR=1
323324
setTEST_CORECLR_FSHARP_SUITE=1
324325
)

‎src/fsharp/CompileOps.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,7 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) =
16831683
yield"System.Collections"// System.Collections.Generic.List<T>
16841684
yield"System.Runtime.Numerics"// BigInteger
16851685
yield"System.Threading"// OperationCanceledException
1686+
yield"System.ValueTuple"
16861687

16871688
yield"System.Web"
16881689
yield"System.Web.Services"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// #Regression
2+
letfailures= reffalse
3+
letreport_failure msg=
4+
printfn"%A" msg
5+
failures:=true
6+
7+
try
8+
letstruct(_x,_y)=struct(1,2)
9+
()
10+
with ex-> report_failure(ex.ToString())
11+
12+
let_=
13+
if!failuresthen
14+
printfn"Test Failed"
15+
exit1
16+
else
17+
printfn"Test Passed"
18+
System.IO.File.WriteAllText("test.ok","ok")
19+
exit0
20+
()

‎tests/fsharp/tests.fs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,13 @@ module ToolsTests =
13781378

13791379

13801380
moduleRegressionTests=
1381+
1382+
[<Test >]
1383+
let``struct-tuple-bug-1-FSC_BASIC``()= singleTestBuildAndRun"regression/struct-tuple-bug-1" FSC_BASIC
1384+
1385+
[<Test >]
1386+
let``tuple-bug-1``()= singleTestBuildAndRun"regression/tuple-bug-1" FSC_BASIC
1387+
13811388
[<Test>]
13821389
let``26``()= singleTestBuildAndRun"regression/26" FSC_BASIC
13831390

@@ -1425,13 +1432,12 @@ module RegressionTests =
14251432
fsc cfg"%s -r:Category.dll -a -o:petshop.dll" cfg.fsc_flags["Category.ml"]
14261433

14271434
peverify cfg"petshop.dll"
1428-
1435+
14291436
[<Test >]
14301437
let``86``()= singleTestBuildAndRun"regression/86" FSC_BASIC
14311438

14321439
[<Test >]
1433-
let``tuple-bug-1``()= singleTestBuildAndRun"regression/tuple-bug-1" FSC_BASIC
1434-
1440+
let``struct-tuple-bug-1-FSI_BASIC``()= singleTestBuildAndRun"regression/struct-tuple-bug-1" FSI_BASIC
14351441

14361442
#if!FSHARP_SUITE_DRIVES_CORECLR_TESTS
14371443
moduleOptimizationTests=

‎tests/scripts/fsci.fsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ let executeFsi references =
5656
letarguments2= sprintf@"%s %s" fsiExe(String.concat"" arguments)
5757
if isVerbosethen
5858
log"%s%s" coreRunExe arguments2
59-
log"%s%s @fsc.cmd.args" coreRunExe fsiExe
60-
File.WriteAllLines(OutputDir++"fsc.cmd.args", arguments)
59+
log"%s%s @fsi.cmd.args" coreRunExe fsiExe
60+
File.WriteAllLines(OutputDir++"fsi.cmd.args", arguments)
6161
File.WriteAllLines(OutputDir++(TestName+".runtimeconfig.json"), runtimeConfigLines)
6262
CopyDlls.Split(';')|> Array.iter(fun s->ifnot(System.String.IsNullOrWhiteSpace(s))then File.Copy(s, OutputDir++ Path.GetFileName(s),true))
6363
executeProcess coreRunExe arguments2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp