Merge branch 'master' into coreclr
This commit is contained in:
Коммит
8a57057473
|
@ -28,6 +28,9 @@ EndProject
|
|||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler", "src\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.VS.FSI", "vsintegration\src\vs\FsPkgs\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Server.Shared", "src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
|
||||
EndProject
|
||||
|
|
|
@ -2,7 +2,8 @@ os: Visual Studio 2015
|
|||
|
||||
environment:
|
||||
matrix:
|
||||
- BUILD_PROFILE: ci
|
||||
- BUILD_PROFILE: ci_part1
|
||||
- BUILD_PROFILE: ci_part2
|
||||
|
||||
init:
|
||||
build_script:
|
||||
|
|
190
build.cmd
190
build.cmd
|
@ -13,7 +13,7 @@ echo Build and run a subset of test suites
|
|||
echo.
|
||||
echo Usage:
|
||||
echo.
|
||||
echo build.cmd ^<all^|build^|debug^|release^|compiler^|coreclr^|pcls^|vs^|ci^|ci_part1^|ci_part2^|ci_part3^>
|
||||
echo build.cmd ^<all^|build^|debug^|release^|compiler^|coreclr^|pcls^|vs^|ci^|ci_part1^|ci_part2^>
|
||||
echo.
|
||||
echo No arguments default to 'build'
|
||||
echo.
|
||||
|
@ -33,6 +33,9 @@ set BUILD_PROTO=0
|
|||
set BUILD_NET40=1
|
||||
set BUILD_PORTABLE=0
|
||||
set BUILD_VS=0
|
||||
set BUILD_FSHARP_DATA_TYPEPROVIDERS=0
|
||||
set BUILD_CONFIG=Release
|
||||
set BUILD_CONFIG_LOWERCASE=release
|
||||
|
||||
set TEST_COMPILERUNIT=0
|
||||
set TEST_NET40_COREUNIT=0
|
||||
|
@ -78,6 +81,7 @@ if /i '%ARG%' == 'all' (
|
|||
set BUILD_PROTO=1
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_VS=1
|
||||
|
@ -89,9 +93,11 @@ REM Same as 'all' but smoke testing only
|
|||
if /i '%ARG%' == 'ci' (
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_CORECLR=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_VS=0
|
||||
|
@ -104,6 +110,8 @@ REM These divide 'ci' into three chunks which can be done in parallel
|
|||
if /i '%ARG%' == 'ci_part1' (
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
|
||||
|
||||
set TEST_COMPILERUNIT=1
|
||||
set TEST_NET40_COREUNIT=1
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
|
@ -113,15 +121,13 @@ if /i '%ARG%' == 'ci_part1' (
|
|||
)
|
||||
|
||||
if /i '%ARG%' == 'ci_part2' (
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_FSHARP_SUITE=1
|
||||
set TEST_TAGS=
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'ci_part3' (
|
||||
set TEST_PORTABLE_COREUNIT=1
|
||||
set TEST_FSHARPQA_SUITE=1
|
||||
set TEST_TAGS=
|
||||
)
|
||||
if /i '%ARG%' == 'smoke' (
|
||||
REM Smoke tests are a very small quick subset of tests
|
||||
|
||||
|
@ -134,16 +140,12 @@ if /i '%ARG%' == 'smoke' (
|
|||
|
||||
if /i '%ARG%' == 'debug' (
|
||||
set BUILD_CONFIG=Debug
|
||||
set BUILD_CONFIG_LOWER=debug
|
||||
set BUILD_CONFIG_LOWERCASE=debug
|
||||
)
|
||||
|
||||
if /i '%ARG%' == 'build' (
|
||||
set BUILD_PORTABLE47=1
|
||||
set BUILD_PORTABLE7=1
|
||||
set BUILD_PORTABLE78=1
|
||||
set BUILD_PORTABLE259=1
|
||||
set BUILD_PORTABLE=1
|
||||
set BUILD_VS=1
|
||||
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
@ -158,6 +160,7 @@ echo BUILD_NET40=%BUILD_NET40%
|
|||
echo BUILD_CORECLR=%BUILD_CORECLR%
|
||||
echo BUILD_PORTABLE=%BUILD_PORTABLE%
|
||||
echo BUILD_VS=%BUILD_VS%
|
||||
echo BUILD_FSHARP_DATA_TYPEPROVIDERS=%BUILD_FSHARP_DATA_TYPEPROVIDERS%
|
||||
echo.
|
||||
echo TEST_COMPILERUNIT=%TEST_COMPILERUNIT%
|
||||
echo TEST_PORTABLE_COREUNIT=%TEST_PORTABLE_COREUNIT%
|
||||
|
@ -166,7 +169,7 @@ echo TEST_FSHARP_SUITE=%TEST_FSHARP_SUITE%
|
|||
echo TEST_FSHARPQA_SUITE=%TEST_FSHARPQA_SUITE%
|
||||
echo TEST_TAGS=%TEST_TAGS%
|
||||
echo BUILD_CONFIG=%BUILD_CONFIG%
|
||||
echo BUILD_CONFIG_LOWER=%BUILD_CONFIG_LOWER%
|
||||
echo BUILD_CONFIG_LOWERCASE=%BUILD_CONFIG_LOWERCASE%
|
||||
echo.
|
||||
|
||||
if "%RestorePackages%"=="" (
|
||||
|
@ -202,7 +205,7 @@ if defined APPVEYOR (
|
|||
set _msbuildexe=%_msbuildexe% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
)
|
||||
)
|
||||
|
||||
set msbuildflags=/maxcpucount
|
||||
set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
|
||||
if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure
|
||||
|
||||
|
@ -237,128 +240,153 @@ rem rename fsi and coreconsole to allow fsi.exe to to start interative
|
|||
pushd .\packages\lkg & ren fsi.exe fsi.dll & popd
|
||||
copy .\packages\lkg\coreconsole.exe .\packages\lkg\fsi.exe
|
||||
|
||||
:: Build Proto
|
||||
if NOT EXIST Proto\net40\bin\fsc-proto.exe ( set BUILD_PROTO=1 )
|
||||
|
||||
:: Build
|
||||
%_msbuildexe% src\fsharp-proto-build.proj
|
||||
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure
|
||||
if '%BUILD_PROTO%' == '1' (
|
||||
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
|
||||
@if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure
|
||||
|
||||
%_ngenexe% install Proto\net40\bin\fsc-proto.exe
|
||||
@if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure
|
||||
)
|
||||
|
||||
%_ngenexe% install Proto\net40\bin\fsc-proto.exe
|
||||
@if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library build failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-compiler-build.proj /p:Configuration=Release
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-compiler-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: compiler build failed && goto :failure
|
||||
|
||||
if '%BUILD_FSHARP_DATA_TYPEPROVIDERS%' == '1' (
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-typeproviders-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: type provider build failed && goto :failure
|
||||
if '%BUILD_CORECLR%' == '1' (
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=coreclr /p:Configuration=%BUILD_CONFIG% /p:RestorePackages=%RestorePackages%
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:TargetFramework=coreclr /p:Configuration=%BUILD_CONFIG% /p:RestorePackages=%RestorePackages%
|
||||
@if ERRORLEVEL 1 echo Error: library coreclr build failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-compiler-build.proj /p:TargetFramework=coreclr /p:Configuration=%BUILD_CONFIG% /p:RestorePackages=%RestorePackages%
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-compiler-build.proj /p:TargetFramework=coreclr /p:Configuration=%BUILD_CONFIG% /p:RestorePackages=%RestorePackages%
|
||||
@if ERRORLEVEL 1 echo Error: compiler coreclr build failed && goto :failure
|
||||
)
|
||||
|
||||
if '%BUILD_PORTABLE%' == '1' (
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable7 build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable7 build failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable47 build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable47 build failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable78 build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable78 build failed && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable259 build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library portable259 build failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_COMPILERUNIT%' == '1' (
|
||||
%_msbuildexe% src/fsharp-compiler-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-compiler-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: compiler unittests build failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_COREUNIT%' == '1' (
|
||||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% src/fsharp-library-unittests-build.proj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_PORTABLE_COREUNIT%' == '1' (
|
||||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed portable7 && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed portable47 && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed portable78 && goto :failure
|
||||
|
||||
%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: library unittests build failed portable259 && goto :failure
|
||||
)
|
||||
|
||||
if '%BUILD_VS%' == '1' (
|
||||
%_msbuildexe% VisualFSharp.sln /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: VS integration build failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% VisualFSharp.sln /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: VS integration build failed && goto :failure
|
||||
)
|
||||
|
||||
@echo on
|
||||
call src\update.cmd %BUILD_CONFIG_LOWER% -ngen
|
||||
call src\update.cmd %BUILD_CONFIG_LOWERCASE% -ngen
|
||||
|
||||
REM Remove lingering copies of the OSS FSharp.Core from the GAC
|
||||
gacutil /u "FSharp.Core, Version=4.4.1.9055, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||
|
||||
REM This clobbers the installed F# SDK on the machine
|
||||
REM call vsintegration\update-vsintegration.cmd %BUILD_CONFIG_LOWER%
|
||||
REM call vsintegration\update-vsintegration.cmd %BUILD_CONFIG_LOWERCASE%
|
||||
pushd tests
|
||||
|
||||
@echo on
|
||||
call BuildTestTools.cmd %BUILD_CONFIG_LOWER%
|
||||
@if ERRORLEVEL 1 echo Error: 'BuildTestTools.cmd %BUILD_CONFIG_LOWER%' failed && goto :failure
|
||||
call BuildTestTools.cmd %BUILD_CONFIG_LOWERCASE%
|
||||
@if ERRORLEVEL 1 echo Error: 'BuildTestTools.cmd %BUILD_CONFIG_LOWERCASE%' failed && goto :failure
|
||||
|
||||
@echo on
|
||||
if '%TEST_FSHARP_SUITE%' == '1' (
|
||||
set FSHARP_TEST_SUITE_USE_NUNIT_RUNNER=true
|
||||
set FSHARP_TEST_SUITE_USE_NUNIT_RUNNER=true
|
||||
|
||||
%_msbuildexe% fsharp\fsharp.tests.fsproj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: fsharp cambridge tests for nunit failed && goto :failure
|
||||
%_msbuildexe% %msbuildflags% fsharp\fsharp.tests.fsproj /p:Configuration=%BUILD_CONFIG%
|
||||
@if ERRORLEVEL 1 echo Error: fsharp cambridge tests for nunit failed && goto :failure
|
||||
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% fsharp %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 type testresults\fsharp_failures.log && echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% fsharp %CONF_CAMBRIDGE_SUITE%' failed && goto :failure
|
||||
set FSHARP_TEST_SUITE_USE_NUNIT_RUNNER=
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharp %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\FSharpNunit_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharp %TEST_TAGS%' failed
|
||||
goto :failure
|
||||
)
|
||||
set FSHARP_TEST_SUITE_USE_NUNIT_RUNNER=
|
||||
)
|
||||
|
||||
if '%TEST_FSHARPQA_SUITE%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% fsharpqa %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 type testresults\fsharpqa_failures.log && echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% fsharpqa %CONF_FSHARPQA_SUITE%' failed && goto :failure
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharpqa %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\fsharpqa_failures.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% fsharpqa %TEST_TAGS%' failed
|
||||
goto :failure
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_COMPILERUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% compilerunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% compilerunit' failed && goto :failure
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% compilerunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CompilerUnit_net40_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% compilerunit' failed
|
||||
goto :failure
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_COREUNITUNIT%' == '1' (
|
||||
if '%TEST_PORTABLE%' == '1' (
|
||||
call RunTests.cmd release coreunitall
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitall' failed && goto :failure
|
||||
)
|
||||
if '%TEST_PORTABLE%' == '0' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% coreunit
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunit' failed && goto :failure
|
||||
if '%TEST_NET40_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_net40_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunit' failed
|
||||
goto :failure
|
||||
)
|
||||
)
|
||||
|
||||
if '%TEST_CORECLR%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% fsharp coreclr
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreclr' failed && goto :failure
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% fsharp coreunitclr
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitclr' failed && goto :failure
|
||||
if '%TEST_PORTABLE_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitportable47 %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_portable47_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitportable47 %TEST_TAGS%' failed
|
||||
goto :failure
|
||||
)
|
||||
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitportable7 %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 (
|
||||
type testresults\CoreUnit_portable7_Error.log
|
||||
echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWERCASE% coreunitportable7 %TEST_TAGS%' failed
|
||||
goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_PORTABLE78_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable78 %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable78' failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_PORTABLE259_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable259 %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable259' failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_PORTABLE259_COREUNIT%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable259 %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable259' failed && goto :failure
|
||||
)
|
||||
|
||||
if '%TEST_VS%' == '1' (
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% ideunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% ideunit' failed && goto :failure
|
||||
call RunTests.cmd %BUILD_CONFIG_LOWER% ideunit %TEST_TAGS%
|
||||
@if ERRORLEVEL 1 echo Error: 'RunTests.cmd %BUILD_CONFIG_LOWER% coreunitportable259' failed && goto :failure
|
||||
)
|
||||
|
||||
popd
|
||||
|
|
|
@ -1157,6 +1157,10 @@ let unfold<'a,'b when 'b : equality> f (start:'a) =
|
|||
[<Test>]
|
||||
let ``unfold is consistent`` () =
|
||||
Check.QuickThrowOnFailure unfold<int,int>
|
||||
|
||||
[<Test; Category("Expensive")>]
|
||||
let ``unfold is consistent full`` () =
|
||||
Check.QuickThrowOnFailure unfold<int,int>
|
||||
Check.QuickThrowOnFailure unfold<string,string>
|
||||
Check.QuickThrowOnFailure unfold<float,int>
|
||||
Check.QuickThrowOnFailure unfold<float,string>
|
||||
|
|
|
@ -24,10 +24,10 @@ let private regQuery = WindowsPlatform.regQuery
|
|||
|
||||
let private checkResult result =
|
||||
match result with
|
||||
| CmdResult.ErrorLevel err -> let x = err, (sprintf "ERRORLEVEL %d" err) in Failure (RunError.ProcessExecError x)
|
||||
| CmdResult.ErrorLevel (msg, err) -> Failure (RunError.ProcessExecError (msg, err, sprintf "ERRORLEVEL %d" err))
|
||||
| CmdResult.Success -> Success ()
|
||||
|
||||
let updateCmd envVars args = processor {
|
||||
let updateCmd envVars args = attempt {
|
||||
// @echo off
|
||||
// setlocal
|
||||
ignore "useless"
|
||||
|
@ -91,12 +91,12 @@ let updateCmd envVars args = processor {
|
|||
// set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
|
||||
let NGEN64 = windir/"Microsoft.NET"/"Framework64"/"v4.0.30319"/"ngen.exe"
|
||||
|
||||
let checkResult = function CmdResult.ErrorLevel err -> Failure (sprintf "ERRORLEVEL %d" err) | CmdResult.Success -> Success ()
|
||||
let checkResult = function CmdResult.ErrorLevel (msg, err) -> Failure (sprintf "%s. ERRORLEVEL %d" msg err) | CmdResult.Success -> Success ()
|
||||
|
||||
let ngen32 = Commands.ngen exec NGEN32 >> checkResult
|
||||
let ngen64 = Commands.ngen exec NGEN64 >> checkResult
|
||||
let sn32 = exec SN32 >> checkResult
|
||||
let sn64 = exec SN32 >> checkResult
|
||||
let sn64 = exec SN64 >> checkResult
|
||||
|
||||
// rem Disable strong-name validation for F# binaries built from open source that are signed with the microsoft key
|
||||
// %SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
|
||||
|
@ -116,7 +116,7 @@ let updateCmd envVars args = processor {
|
|||
// %SN32% -Vr Unittests,b03f5f7f11d50a3a
|
||||
// %SN32% -Vr Salsa,b03f5f7f11d50a3a
|
||||
|
||||
let strongName (snExe: string -> Result<_,_>) = processor {
|
||||
let strongName (snExe: string -> Result<_,_>) = attempt {
|
||||
let all =
|
||||
[ "FSharp.Core";
|
||||
"FSharp.Build";
|
||||
|
@ -129,7 +129,8 @@ let updateCmd envVars args = processor {
|
|||
"VisualFSharp.Unittests";
|
||||
"VisualFSharp.Salsa" ]
|
||||
for a in all do
|
||||
do! snExe (sprintf " -Vr %s,b03f5f7f11d50a3a" a)
|
||||
snExe (sprintf " -Vr %s,b03f5f7f11d50a3a" a) |> ignore // ignore result - SN is not needed for tests to pass, and this fails without admin rights
|
||||
|
||||
}
|
||||
|
||||
do! strongName sn32
|
||||
|
@ -165,14 +166,15 @@ let updateCmd envVars args = processor {
|
|||
// "%NGEN32%" install "%BINDIR%\fsi.exe" /queue:1
|
||||
// "%NGEN32%" install "%BINDIR%\FSharp.Build.dll" /queue:1
|
||||
// "%NGEN32%" executeQueuedItems 1
|
||||
do! ngen32 [binDir/"fsc.exe"; binDir/"fsi.exe"; binDir/"FSharp.Build.dll"]
|
||||
ngen32 [binDir/"fsc.exe"; binDir/"fsi.exe"; binDir/"FSharp.Build.dll"] |> ignore // Ignore because may fail without admin rights
|
||||
|
||||
|
||||
// if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
if processorArchitecture = AMD64 then
|
||||
// "%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" /queue:1
|
||||
// "%NGEN64%" install "%BINDIR%\FSharp.Build.dll" /queue:1
|
||||
// "%NGEN64%" executeQueuedItems 1
|
||||
do! ngen64 [binDir/"fsiAnyCpu.exe"; binDir/"FSharp.Build.dll"]
|
||||
ngen64 [binDir/"fsiAnyCpu.exe"; binDir/"FSharp.Build.dll"] |> ignore // Ignore because may fail without admin rights
|
||||
// )
|
||||
//:donengen
|
||||
|
||||
|
|
|
@ -2,15 +2,11 @@
|
|||
|
||||
if /i "%1" == "debug" goto :ok
|
||||
if /i "%1" == "release" goto :ok
|
||||
if /i "%1" == "vsdebug" goto :ok
|
||||
if /i "%1" == "vsrelease" goto :ok
|
||||
|
||||
echo Builds a few test tools using latest compiler and runtime
|
||||
echo Usage:
|
||||
echo BuildTestTools.cmd debug
|
||||
echo BuildTestTools.cmd release
|
||||
echo BuildTestTools.cmd vsdebug
|
||||
echo BuildTestTools.cmd vsrelease
|
||||
exit /b 1
|
||||
|
||||
:ok
|
||||
|
@ -88,10 +84,10 @@ rem deploy osx version of built compiler
|
|||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --TargetPlatformName:DNXCore,Version=v5.0/osx.10.10-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --targetPlatformName:DNXCore,Version=v5.0/ubuntu.14.04-x64 --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\fsc\osx.10.10-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:yes --v:quiet
|
||||
%_fsiexe% --exec %~dp0fsharpqa\testenv\src\DeployProj\DeployProj.fsx --TargetPlatformName:DNXCore,Version=v5.0/osx.10.10-x64 --projectJson:%~dp0fsharp\project.json --projectJsonLock:%~dp0fsharp\project.lock.json --packagesDir:%~dp0..\packages --targetPlatformName:DNXCore,Version=v5.0/win7-x64 --fsharpCore:%~dp0..\%1\coreclr\bin\fsharp.core.dll --output:%~dp0testbin\%1\coreclr\osx.10.10-x64 --nugetPath:%~dp0..\.nuget\nuget.exe --nugetConfig:%~dp0..\.nuget\nuget.config --copyCompiler:no --v:quiet
|
||||
|
||||
echo "%NUNITPATH%*.*" "%~dp0\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%NUNITPATH%*.*" "%~dp0\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
echo "%~dp0\fsharpqa\testenv\src\nunit*.*" "%~dp0\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%~dp0\fsharpqa\testenv\src\nunit*.*" "%~dp0\fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
echo "%NUNITPATH%*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%NUNITPATH%*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
echo "%~dp0fsharpqa\testenv\src\nunit*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
xcopy "%~dp0fsharpqa\testenv\src\nunit*.*" "%~dp0fsharpqa\testenv\bin\nunit\*.*" /S /Q /Y
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
|
|
|
@ -6,9 +6,9 @@ if /I "%FLAVOR%" == "debug" (goto :FLAVOR_OK)
|
|||
if /I "%FLAVOR%" == "release" (goto :FLAVOR_OK)
|
||||
goto :USAGE
|
||||
|
||||
:flavor_ok
|
||||
:FLAVOR_OK
|
||||
|
||||
set NUNITPATH=%~dp0\fsharpqa\testenv\bin\nunit\
|
||||
set NUNITPATH=%~dp0fsharpqa\testenv\bin\nunit\
|
||||
if not exist "%~dp0%..\packages\NUnit.Console.3.0.0\tools\" (
|
||||
pushd %~dp0
|
||||
..\.nuget\nuget.exe restore ..\packages.config -PackagesDirectory ..\packages
|
||||
|
@ -48,12 +48,12 @@ if /I '%_tmp%' == 'coreclr' (
|
|||
)
|
||||
|
||||
rem "nottags" indicates which test areas/test cases will NOT be run, based on the tags in the test.lst and env.lst files
|
||||
set NO_TTAGS_ARG=-nottags:ReqPP,NOOPEN
|
||||
set NO_TTAGS=ReqPP,NOOPEN
|
||||
set NO_TTAGS_ARG=-nottags:NOOPEN
|
||||
set NO_TTAGS=NOOPEN
|
||||
set _tmp=%4
|
||||
if not '%_tmp%' == '' (
|
||||
set NO_TTAGS_ARG=-nottags:ReqPP,NOOPEN,%_tmp:"=%
|
||||
set NO_TTAGS=ReqPP,NOOPEN,%_tmp:"=%
|
||||
set NO_TTAGS_ARG=-nottags:NOOPEN,%_tmp:"=%
|
||||
set NO_TTAGS=NOOPEN,%_tmp:"=%
|
||||
)
|
||||
|
||||
if /I "%APPVEYOR_CI%" == "1" (
|
||||
|
@ -80,12 +80,12 @@ set FSCBINPATH=%~dp0..\%FLAVOR%\net40\bin
|
|||
ECHO FSCBINPATH%
|
||||
|
||||
rem folder where test logs/results will be dropped
|
||||
set RESULTSDIR=%~dp0\TestResults
|
||||
set RESULTSDIR=%~dp0TestResults
|
||||
if not exist "%RESULTSDIR%" (mkdir "%RESULTSDIR%")
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
SET CONV_V2_TO_V3_CMD=%FSI% --exec --nologo "%~dp0%\Convert-NUnit2Args-to-NUnit3Where.fsx" -- "!TTAGS!" "!NO_TTAGS!"
|
||||
SET CONV_V2_TO_V3_CMD="%LKG_FSI%" --exec --nologo "%~dp0%Convert-NUnit2Args-to-NUnit3Where.fsx" -- "!TTAGS!" "!NO_TTAGS!"
|
||||
echo %CONV_V2_TO_V3_CMD%
|
||||
|
||||
SET CONV_V2_TO_V3_CMD_TEMPFILE=%~dp0%nunit3args.txt
|
||||
|
@ -149,6 +149,8 @@ if /I "%2" == "coreunitcoreclr" (
|
|||
)
|
||||
if /I "%2" == "ideunit" (goto :IDEUNIT)
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:USAGE
|
||||
|
||||
echo Usage:
|
||||
|
@ -157,6 +159,8 @@ echo RunTests.cmd ^<debug^|release^> ^<fsharp^|fsharpqa^|coreunit^|coreunitporta
|
|||
echo.
|
||||
exit /b 1
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:FSHARP
|
||||
|
||||
if not '%FSHARP_TEST_SUITE_USE_NUNIT_RUNNER%' == '' (
|
||||
|
@ -185,21 +189,23 @@ if errorlevel 1 (
|
|||
)
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:FSHARP_NUNIT
|
||||
|
||||
set FSHARP_TEST_SUITE_CONFIGURATION=%FLAVOR%
|
||||
|
||||
set XMLFILE=FSharpNunit_Xml.xml
|
||||
set OUTPUTFILE=FSharpNunit_Output.log
|
||||
set ERRORFILE=FSharpNunit_Error.log
|
||||
set XMLFILE=%RESULTSDIR%\FSharpNunit_Xml.xml
|
||||
set OUTPUTFILE=%RESULTSDIR%\FSharpNunit_Output.log
|
||||
set ERRORFILE=%RESULTSDIR%\FSharpNunit_Error.log
|
||||
|
||||
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%;format=nunit2" --err:"%ERRORFILE%" --result:"%XMLFILE%"
|
||||
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%;format=nunit2" --err:"%ERRORFILE%" --result:"%XMLFILE%"
|
||||
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
|
||||
|
||||
call :UPLOAD_XML "%XMLFILE%"
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:FSHARPQA
|
||||
set OSARCH=%PROCESSOR_ARCHITECTURE%
|
||||
|
@ -274,7 +280,7 @@ if /I "%2" == "fsharpqadowntarget" (
|
|||
if /I "%2" == "fsharpqaredirect" (
|
||||
set ISCFLAGS=--noframework -r "%FSCOREDLLVPREVPATH%" -r "%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r System.dll -r System.Runtime.dll -r System.Xml.dll -r System.Data.dll -r System.Web.dll -r System.Core.dll -r System.Numerics.dll
|
||||
set PLATFORM=%OSARCH%
|
||||
set SIMULATOR_PIPE="%~dp0\fsharpqa\testenv\bin\$PLATFORM\ExecAssembly.exe"
|
||||
set SIMULATOR_PIPE="%~dp0fsharpqa\testenv\bin\$PLATFORM\ExecAssembly.exe"
|
||||
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,NoCrossVer,FSI
|
||||
set RESULTFILE=FSharpQARedirect_Results.log
|
||||
set FAILFILE=FSharpQARedirect_Failures.log
|
||||
|
@ -287,13 +293,15 @@ if errorlevel 1 (
|
|||
exit /b 1
|
||||
)
|
||||
|
||||
pushd %~dp0\fsharpqa\source
|
||||
echo perl %~dp0\fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:yes %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
perl %~dp0\fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:yes %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
pushd %~dp0fsharpqa\source
|
||||
echo perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:yes %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
perl %~dp0fsharpqa\testenv\bin\runall.pl -resultsroot %RESULTSDIR% -results %RESULTFILE% -log %FAILFILE% -fail %FAILENV% -cleanup:yes %TTAGS_ARG% %NO_TTAGS_ARG% %PARALLEL_ARG%
|
||||
|
||||
popd
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:COREUNIT
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CoreUnit_%coreunitsuffix%_Xml.xml
|
||||
|
@ -345,6 +353,8 @@ echo "%CORERUNPATH%\corerun.exe" "%testbinpath%%flavor%\coreclr\fsharp.core.unit
|
|||
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:COMPILERUNIT
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\CompilerUnit_%compilerunitsuffix%_Xml.xml
|
||||
|
@ -357,6 +367,8 @@ echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:
|
|||
call :UPLOAD_XML "%XMLFILE%"
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:IDEUNIT
|
||||
|
||||
set XMLFILE=%RESULTSDIR%\IDEUnit_Xml.xml
|
||||
|
@ -378,6 +390,8 @@ powershell -File Upload-Results.ps1 %RESULTSDIR%\%XMLFILE%
|
|||
|
||||
goto :EOF
|
||||
|
||||
REM ----------------------------------------------------------------------------
|
||||
|
||||
:UPLOAD_XML
|
||||
|
||||
rem See <http://www.appveyor.com/docs/environment-variables>
|
||||
|
@ -386,7 +400,7 @@ if not defined APPVEYOR goto :EOF
|
|||
set saved_errorlevel=%errorlevel%
|
||||
echo Saved errorlevel %saved_errorlevel%
|
||||
powershell -File Upload-Results.ps1 "%~1"
|
||||
if %saved_errorlevel% neq 0 exit /b %saved_errorlevel%
|
||||
if NOT %saved_errorlevel% == 0 exit /b %saved_errorlevel%
|
||||
goto :EOF
|
||||
|
||||
:: Note: "goto :EOF" returns from an in-batchfile "call" command
|
||||
|
|
|
@ -11,7 +11,7 @@ Write-Verbose ""
|
|||
# See <http://www.appveyor.com/docs/running-tests>
|
||||
# and <http://www.appveyor.com/docs/environment-variables>
|
||||
$url = "$env:APPVEYOR_URL/api/testresults/$format/$($env:APPVEYOR_JOB_ID)"
|
||||
Write-Output "Uploading results to $url"
|
||||
Write-Output "Uploading results $path to $url"
|
||||
|
||||
$wc = New-Object 'System.Net.WebClient'
|
||||
$wc.UploadFile($url, (Resolve-Path $path))
|
||||
|
|
|
@ -23,12 +23,6 @@ type private FSLibPaths =
|
|||
FSDATATPPATH : string
|
||||
FSCOREDLLVPREVPATH : string }
|
||||
|
||||
|
||||
let private checkResult result =
|
||||
match result with
|
||||
| CmdResult.ErrorLevel err -> let x = err, (sprintf "ERRORLEVEL %d" err) in Failure (RunError.ProcessExecError x)
|
||||
| CmdResult.Success -> Success ()
|
||||
|
||||
// REM ===
|
||||
// REM === Find paths to shipped F# libraries referenced by clients
|
||||
// REM ===
|
||||
|
|
|
@ -79,8 +79,9 @@ let ngen exec (ngenExe: FilePath) assemblies =
|
|||
List.concat [ queue; ["executeQueuedItems 1"] ]
|
||||
|> Seq.ofList
|
||||
|> Seq.map (fun args -> exec ngenExe args)
|
||||
|> Seq.takeWhile (function ErrorLevel _ -> false | Ok -> true)
|
||||
|> Seq.last
|
||||
|> Seq.skipWhile (function ErrorLevel _ -> false | CmdResult.Success -> true)
|
||||
|> Seq.tryHead
|
||||
|> function None -> CmdResult.Success | Some res -> res
|
||||
|
||||
let fsc exec (fscExe: FilePath) flags srcFiles =
|
||||
// "%FSC%" %fsc_flags% --define:COMPILING_WITH_EMPTY_SIGNATURE -o:tmptest2.exe tmptest2.mli tmptest2.ml
|
||||
|
|
|
@ -4,7 +4,7 @@ open PlatformHelpers
|
|||
|
||||
type RunError =
|
||||
| GenericError of string
|
||||
| ProcessExecError of (int * string)
|
||||
| ProcessExecError of (string * int * string)
|
||||
| Skipped of string
|
||||
|
||||
type Permutation =
|
||||
|
@ -14,18 +14,11 @@ type Permutation =
|
|||
| FSI_STDIN_GUI
|
||||
| FSC_BASIC
|
||||
| FSC_BASIC_64
|
||||
| FSC_HW
|
||||
| FSC_O3
|
||||
| GENERATED_SIGNATURE
|
||||
| EMPTY_SIGNATURE
|
||||
| EMPTY_SIGNATURE_OPT
|
||||
| FSC_OPT_MINUS_DEBUG
|
||||
| FSC_OPT_PLUS_DEBUG
|
||||
| FRENCH
|
||||
| SPANISH
|
||||
| AS_DLL
|
||||
| WRAPPER_NAMESPACE
|
||||
| WRAPPER_NAMESPACE_OPT
|
||||
override this.ToString() = (sprintf "%A" this)
|
||||
|
||||
type TestConfig =
|
||||
|
|
|
@ -18,7 +18,7 @@ type FilePath = string
|
|||
|
||||
type CmdResult =
|
||||
| Success
|
||||
| ErrorLevel of int
|
||||
| ErrorLevel of string * int
|
||||
|
||||
type CmdArguments =
|
||||
{ RedirectOutput : (string -> unit) option
|
||||
|
@ -51,50 +51,41 @@ module Process =
|
|||
p.EnableRaisingEvents <- true
|
||||
p.StartInfo <- processInfo
|
||||
|
||||
cmdArgs.RedirectOutput
|
||||
|> Option.map (fun f -> (fun (ea: DataReceivedEventArgs) -> ea.Data |> f))
|
||||
|> Option.iter (fun newOut ->
|
||||
cmdArgs.RedirectOutput|> Option.iter (fun f ->
|
||||
processInfo.RedirectStandardOutput <- true
|
||||
p.OutputDataReceived.Add newOut
|
||||
p.OutputDataReceived.Add (fun ea -> if ea.Data <> null then f ea.Data)
|
||||
)
|
||||
|
||||
cmdArgs.RedirectError
|
||||
|> Option.map (fun f -> (fun (ea: DataReceivedEventArgs) -> ea.Data |> f))
|
||||
|> Option.iter (fun newErr ->
|
||||
cmdArgs.RedirectError |> Option.iter (fun f ->
|
||||
processInfo.RedirectStandardError <- true
|
||||
p.ErrorDataReceived.Add newErr
|
||||
p.ErrorDataReceived.Add (fun ea -> if ea.Data <> null then f ea.Data)
|
||||
)
|
||||
|
||||
cmdArgs.RedirectInput
|
||||
|> Option.iter (fun _ -> p.StartInfo.RedirectStandardInput <- true)
|
||||
|
||||
let exitedAsync (proc: Process) =
|
||||
let tcs = new System.Threading.Tasks.TaskCompletionSource<int>();
|
||||
p.Exited.Add (fun s ->
|
||||
tcs.TrySetResult(proc.ExitCode) |> ignore
|
||||
proc.Dispose())
|
||||
tcs.Task
|
||||
|
||||
p.Start() |> ignore
|
||||
|
||||
cmdArgs.RedirectOutput |> Option.iter (fun _ -> p.BeginOutputReadLine())
|
||||
cmdArgs.RedirectError |> Option.iter (fun _ -> p.BeginErrorReadLine())
|
||||
|
||||
cmdArgs.RedirectInput
|
||||
|> Option.map (fun input -> async {
|
||||
cmdArgs.RedirectInput |> Option.iter (fun input ->
|
||||
async {
|
||||
let inputWriter = p.StandardInput
|
||||
do! inputWriter.FlushAsync () |> Async.AwaitIAsyncResult |> Async.Ignore
|
||||
input inputWriter
|
||||
do! inputWriter.FlushAsync () |> Async.AwaitIAsyncResult |> Async.Ignore
|
||||
inputWriter.Close ()
|
||||
})
|
||||
|> Option.iter Async.Start
|
||||
}
|
||||
|> Async.Start)
|
||||
|
||||
let exitCode = p |> exitedAsync |> Async.AwaitTask |> Async.RunSynchronously
|
||||
p.WaitForExit()
|
||||
|
||||
match exitCode with
|
||||
match p.ExitCode with
|
||||
| 0 -> Success
|
||||
| err -> ErrorLevel err
|
||||
| err ->
|
||||
let msg = sprintf "Error running command '%s' with args '%s' in directory '%s'" exePath arguments workDir
|
||||
ErrorLevel (msg, err)
|
||||
|
||||
|
||||
|
||||
|
@ -176,28 +167,16 @@ type AttemptBuilder() =
|
|||
this.Delay(fun () -> body enum.Current)))
|
||||
|
||||
let attempt = new AttemptBuilder()
|
||||
let processor = attempt //TODO deprecated
|
||||
|
||||
let log format = Printf.ksprintf (printfn "%s") format
|
||||
|
||||
type OutPipe (mailbox: MailboxProcessor<_>) =
|
||||
member x.Post msg = mailbox.Post(msg)
|
||||
interface System.IDisposable with
|
||||
member x.Dispose () =
|
||||
async {
|
||||
while mailbox.CurrentQueueLength > 0 do
|
||||
let timeout = System.TimeSpan.FromMilliseconds(50.0)
|
||||
do! Async.Sleep (timeout.TotalMilliseconds |> int)
|
||||
} |> Async.RunSynchronously
|
||||
|
||||
let redirectTo (writer: TextWriter) =
|
||||
let mailbox = MailboxProcessor.Start(fun inbox ->
|
||||
let rec loop () = async {
|
||||
let! (msg : string) = inbox.Receive ()
|
||||
do! writer.WriteLineAsync(msg) |> (Async.AwaitIAsyncResult >> Async.Ignore)
|
||||
return! loop () }
|
||||
loop ())
|
||||
new OutPipe (mailbox)
|
||||
type OutPipe (writer: TextWriter) =
|
||||
member x.Post (msg:string) = lock writer (fun () -> writer.WriteLine(msg))
|
||||
interface System.IDisposable with
|
||||
member __.Dispose() = writer.Flush()
|
||||
|
||||
let redirectTo (writer: TextWriter) = new OutPipe (writer)
|
||||
|
||||
let redirectToLog () = redirectTo System.Console.Out
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// #Conformance #Sequences #Regression #ControlFlow #SyntacticSugar #ComputationExpressions
|
||||
|
||||
//#nowarn "57"
|
||||
module Test
|
||||
|
||||
|
||||
open System.Text.RegularExpressions
|
||||
open System.IO
|
|
@ -1,4 +1,5 @@
|
|||
// #Conformance #FSI
|
||||
module FlagCheck
|
||||
#nowarn "22"
|
||||
#if INTERACTIVE
|
||||
printfn "INTERACTIVE is defined"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
usesfsi.fsx(2,1): error FS0039: The namespace or module 'fsi' is not defined
|
|
@ -32,10 +32,9 @@ namespace FSI_0002
|
|||
namespace FSI_0002
|
||||
|
||||
>
|
||||
|
||||
Test 4=================================================
|
||||
Test 5=================================================
|
||||
|
||||
usesfsi.fsx(2,1): error FS0039: The namespace or module 'fsi' is not defined
|
||||
Test 6=================================================
|
||||
Test 7=================================================
|
||||
Hello
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
del 3.exe 2>nul 1>nul
|
||||
type 1.fsx
|
||||
type 2.fsx
|
||||
type 2.fsx
|
||||
type 3.fsx
|
||||
echo Test 1=================================================
|
||||
"%FSC%" 3.fsx --nologo
|
||||
|
|
|
@ -5,9 +5,9 @@ open coreclrutilities
|
|||
#endif
|
||||
|
||||
#light
|
||||
|
||||
#if COMPILED
|
||||
module Tests
|
||||
|
||||
#endif
|
||||
let mutable failures = []
|
||||
let report_failure s =
|
||||
stderr.WriteLine " NO"; failures <- s :: failures
|
Двоичный файл не отображается.
|
@ -0,0 +1 @@
|
|||
foo
|
|
@ -1,14 +1,3 @@
|
|||
[Building 2 4...done]
|
||||
[Building 2 6...done]
|
||||
[Building 2 8...done]
|
||||
[Building 2 10...done]
|
||||
[Building 2 12...done]
|
||||
[Building 2 14...done]
|
||||
[Building 3 8...done]
|
||||
[Building 4 8...done]
|
||||
[Building 5 8...done]
|
||||
[Building 6 8...done]
|
||||
[Building 5 3...done]
|
||||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
@ -234,8 +223,6 @@ stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expe
|
|||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
Expect ABC = ABC
|
||||
Expect ABC = ABC
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
|
@ -1783,286 +1783,66 @@ type Regression4319_T2 =
|
|||
static member ( +-+-+ ) : x:'a * y:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T0 =
|
||||
class
|
||||
static member ( +-+-+ ) : string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1c =
|
||||
class
|
||||
static member ( +-+-+ ) : x:('a * 'b) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1d =
|
||||
class
|
||||
static member ( +-+-+ ) : x:(int * int) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U2 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b -> moreArgs:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> moreArgs:'d -> string
|
||||
end
|
||||
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_check =
|
||||
class
|
||||
|
@ -2092,11 +1872,6 @@ type Regression4319_check =
|
|||
static member ( - ) : string
|
||||
end
|
||||
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
> Expect ABC = ABC
|
||||
|
||||
type Regression4469 =
|
||||
|
@ -2750,32 +2525,12 @@ val fff : x:'a -> 'a
|
|||
val note_ExpectDupMethod : string =
|
||||
"Regression4927: Expect error due to duplicate methods in the "+[20 chars]
|
||||
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
> >
|
||||
val note_ExpectDupProperty : string =
|
||||
"Regression4927: Expect error due to duplicate properties in t"+[23 chars]
|
||||
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
> > > val it : string = "NOTE: Expect IAPrivate less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> > val it : string = "NOTE: Expect IAPrivate less accessible IBInternal"
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
> >
|
||||
module Regression5265_PriPri = begin
|
||||
type private IAPrivate =
|
||||
|
@ -2790,11 +2545,6 @@ module Regression5265_PriPri = begin
|
|||
end
|
||||
|
||||
> val it : string = "NOTE: Expect IAInternal less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> >
|
||||
module Regression5265_IntInt = begin
|
||||
type internal IAInternal =
|
||||
|
@ -2862,11 +2612,6 @@ end
|
|||
|
||||
> val it : string =
|
||||
"Regression4232: Expect an error about duplicate virtual methods from parent type"
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
> > val it : string =
|
||||
"** Expect AnAxHostSubClass to be accepted. AxHost has a newslot virtual RightToLeft property outscope RightToLeft on Control"
|
||||
>
|
||||
|
@ -2878,36 +2623,16 @@ type AnAxHostSubClass =
|
|||
|
||||
> val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables"
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (match value generic)"
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (when active pattern also has parameters)"
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect OK, since error message says constraint should work!"
|
||||
>
|
||||
val ( |A|B| ) : x:int -> Choice<int,unit>
|
||||
|
||||
> val it : string = "** Expect error since active pattern is not a function!"
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
||||
> > val it : string =
|
||||
"** Expect OK since active pattern result is not too generic, typars depend on match val"
|
||||
>
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
|
@ -1032,93 +1032,43 @@ type Regression4319_T2 =
|
|||
static member ( +-+-+ ) : x:'a * y:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T0 =
|
||||
class
|
||||
static member ( +-+-+ ) : string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1c =
|
||||
class
|
||||
static member ( +-+-+ ) : x:('a * 'b) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1d =
|
||||
class
|
||||
static member ( +-+-+ ) : x:(int * int) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
type Regression4319_U1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
|
@ -1130,188 +1080,18 @@ type Regression4319_U1b =
|
|||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U2 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b -> moreArgs:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> moreArgs:'d -> string
|
||||
end
|
||||
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_check =
|
||||
class
|
||||
|
@ -1341,11 +1121,6 @@ type Regression4319_check =
|
|||
static member ( - ) : string
|
||||
end
|
||||
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
> Expect ABC = ABC
|
||||
|
||||
type Regression4469 =
|
||||
|
@ -1999,32 +1774,12 @@ val fff : x:'a -> 'a
|
|||
val note_ExpectDupMethod : string =
|
||||
"Regression4927: Expect error due to duplicate methods in the "+[20 chars]
|
||||
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
> >
|
||||
val note_ExpectDupProperty : string =
|
||||
"Regression4927: Expect error due to duplicate properties in t"+[23 chars]
|
||||
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
> > > val it : string = "NOTE: Expect IAPrivate less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> > val it : string = "NOTE: Expect IAPrivate less accessible IBInternal"
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
> >
|
||||
module Regression5265_PriPri = begin
|
||||
type private IAPrivate =
|
||||
|
@ -2039,11 +1794,6 @@ module Regression5265_PriPri = begin
|
|||
end
|
||||
|
||||
> val it : string = "NOTE: Expect IAInternal less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> >
|
||||
module Regression5265_IntInt = begin
|
||||
type internal IAInternal =
|
||||
|
@ -2111,11 +1861,6 @@ end
|
|||
|
||||
> val it : string =
|
||||
"Regression4232: Expect an error about duplicate virtual methods from parent type"
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
> > val it : string =
|
||||
"** Expect AnAxHostSubClass to be accepted. AxHost has a newslot virtual RightToLeft property outscope RightToLeft on Control"
|
||||
>
|
||||
|
@ -2127,21 +1872,6 @@ type AnAxHostSubClass =
|
|||
|
||||
> val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables"
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (match value generic)"
|
||||
> > val it : string =
|
||||
|
@ -2152,11 +1882,6 @@ stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing
|
|||
val ( |A|B| ) : x:int -> Choice<int,unit>
|
||||
|
||||
> val it : string = "** Expect error since active pattern is not a function!"
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
||||
> > val it : string =
|
||||
"** Expect OK since active pattern result is not too generic, typars depend on match val"
|
||||
>
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
|
@ -5310,286 +5310,66 @@ type Regression4319_T2 =
|
|||
static member ( +-+-+ ) : x:'a * y:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T0 =
|
||||
class
|
||||
static member ( +-+-+ ) : string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1c =
|
||||
class
|
||||
static member ( +-+-+ ) : x:('a * 'b) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1d =
|
||||
class
|
||||
static member ( +-+-+ ) : x:(int * int) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U2 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b -> moreArgs:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> moreArgs:'d -> string
|
||||
end
|
||||
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_check =
|
||||
class
|
||||
|
@ -5619,11 +5399,6 @@ type Regression4319_check =
|
|||
static member ( - ) : string
|
||||
end
|
||||
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
> Expect ABC = ABC
|
||||
|
||||
type Regression4469 =
|
||||
|
@ -6277,32 +6052,12 @@ val fff : x:'a -> 'a
|
|||
val note_ExpectDupMethod : string =
|
||||
"Regression4927: Expect error due to duplicate methods in the "+[20 chars]
|
||||
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
> >
|
||||
val note_ExpectDupProperty : string =
|
||||
"Regression4927: Expect error due to duplicate properties in t"+[23 chars]
|
||||
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
> > > val it : string = "NOTE: Expect IAPrivate less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> > val it : string = "NOTE: Expect IAPrivate less accessible IBInternal"
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
> >
|
||||
module Regression5265_PriPri = begin
|
||||
type private IAPrivate =
|
||||
|
@ -6317,11 +6072,6 @@ module Regression5265_PriPri = begin
|
|||
end
|
||||
|
||||
> val it : string = "NOTE: Expect IAInternal less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> >
|
||||
module Regression5265_IntInt = begin
|
||||
type internal IAInternal =
|
||||
|
@ -6389,11 +6139,6 @@ end
|
|||
|
||||
> val it : string =
|
||||
"Regression4232: Expect an error about duplicate virtual methods from parent type"
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
> > val it : string =
|
||||
"** Expect AnAxHostSubClass to be accepted. AxHost has a newslot virtual RightToLeft property outscope RightToLeft on Control"
|
||||
>
|
||||
|
@ -6405,36 +6150,16 @@ type AnAxHostSubClass =
|
|||
|
||||
> val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables"
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (match value generic)"
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (when active pattern also has parameters)"
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect OK, since error message says constraint should work!"
|
||||
>
|
||||
val ( |A|B| ) : x:int -> Choice<int,unit>
|
||||
|
||||
> val it : string = "** Expect error since active pattern is not a function!"
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
||||
> > val it : string =
|
||||
"** Expect OK since active pattern result is not too generic, typars depend on match val"
|
||||
>
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
|
@ -808,286 +808,66 @@ type Regression4319_T2 =
|
|||
static member ( +-+-+ ) : x:'a * y:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T0 =
|
||||
class
|
||||
static member ( +-+-+ ) : string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1c =
|
||||
class
|
||||
static member ( +-+-+ ) : x:('a * 'b) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T1d =
|
||||
class
|
||||
static member ( +-+-+ ) : x:(int * int) -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_T3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U1b =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a -> moreArgs:'b -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U2 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b -> moreArgs:'c -> string
|
||||
end
|
||||
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_U3 =
|
||||
class
|
||||
static member ( +-+-+ ) : x:'a * y:'b * z:'c -> moreArgs:'d -> string
|
||||
end
|
||||
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
>
|
||||
type Regression4319_check =
|
||||
class
|
||||
|
@ -1117,11 +897,6 @@ type Regression4319_check =
|
|||
static member ( - ) : string
|
||||
end
|
||||
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
> Expect ABC = ABC
|
||||
|
||||
type Regression4469 =
|
||||
|
@ -1774,31 +1549,11 @@ val fff : x:'a -> 'a
|
|||
>
|
||||
val note_ExpectDupMethod : string
|
||||
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
> >
|
||||
val note_ExpectDupProperty : string
|
||||
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
> > > val it : string = "NOTE: Expect IAPrivate less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> > val it : string = "NOTE: Expect IAPrivate less accessible IBInternal"
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
> >
|
||||
module Regression5265_PriPri = begin
|
||||
type private IAPrivate =
|
||||
|
@ -1813,11 +1568,6 @@ module Regression5265_PriPri = begin
|
|||
end
|
||||
|
||||
> val it : string = "NOTE: Expect IAInternal less accessible IBPublic"
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
> >
|
||||
module Regression5265_IntInt = begin
|
||||
type internal IAInternal =
|
||||
|
@ -1885,11 +1635,6 @@ end
|
|||
|
||||
> val it : string =
|
||||
"Regression4232: Expect an error about duplicate virtual methods from parent type"
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
> > val it : string =
|
||||
"** Expect AnAxHostSubClass to be accepted. AxHost has a newslot virtual RightToLeft property outscope RightToLeft on Control"
|
||||
>
|
||||
|
@ -1901,36 +1646,16 @@ type AnAxHostSubClass =
|
|||
|
||||
> val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables"
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (match value generic)"
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect error because the active pattern result contains free type variables (when active pattern also has parameters)"
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
> > val it : string =
|
||||
"** Expect OK, since error message says constraint should work!"
|
||||
>
|
||||
val ( |A|B| ) : x:int -> Choice<int,unit>
|
||||
|
||||
> val it : string = "** Expect error since active pattern is not a function!"
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
||||
> > val it : string =
|
||||
"** Expect OK since active pattern result is not too generic, typars depend on match val"
|
||||
>
|
|
@ -0,0 +1,275 @@
|
|||
|
||||
type Regression4319_T0 = static member (+-+-+) = "0 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(572,42): warning FS1172: Infix operator member '+-+-+' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1 = static member (+-+-+) x = "1 argument";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(573,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1b = static member (+-+-+) (x) = "1 (argument) [brackets make no diff]";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(574,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1c = static member (+-+-+) x = let a,b = x in "1 argument, tuple typed from RHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(575,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T1d = static member (+-+-+) (x:int*int) = "1 argument, tuple typed from LHS. Still not OK";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(576,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_T3 = static member (+-+-+) (x,y,z) = "3 arguments";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(578,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1 = static member (+-+-+) x moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(579,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1173: Infix operator member '+-+-+' has 1 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U1b = static member (+-+-+) (x) moreArgs = "1 (argument) [brackets make no diff] and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(580,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U2 = static member (+-+-+) (x,y) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(581,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1173: Infix operator member '+-+-+' has 3 initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
type Regression4319_U3 = static member (+-+-+) (x,y,z) moreArgs = "1 argument and further args";;
|
||||
-----------------------------------------^^^^^
|
||||
|
||||
stdin(582,42): warning FS1174: Infix operator member '+-+-+' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS1172: Infix operator member ':=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (:=) = "COLON_EQUALS"
|
||||
-------------------^^
|
||||
|
||||
stdin(585,20): warning FS0086: The name '(:=)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS1172: Infix operator member '&' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (&) = "AMP"
|
||||
-------------------^
|
||||
|
||||
stdin(589,20): warning FS0086: The name '(&)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name 'op_Amp' instead.
|
||||
|
||||
static member (&^) = "AMP_AMP"
|
||||
-------------------^^
|
||||
|
||||
stdin(590,20): warning FS1172: Infix operator member '&^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS1172: Infix operator member '=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (=) = "EQUALS"
|
||||
-------------------^
|
||||
|
||||
stdin(591,20): warning FS0086: The name '(=)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name 'op_Equality' instead.
|
||||
|
||||
static member (!=) = "INFIX_COMPARE_OP"
|
||||
-------------------^^
|
||||
|
||||
stdin(593,20): warning FS1172: Infix operator member '!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(597,20): warning FS1172: Infix operator member '...=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...!=) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^^
|
||||
|
||||
stdin(598,20): warning FS1172: Infix operator member '...!=' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...<) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(599,20): warning FS1172: Infix operator member '...<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...>) = "INFIX_COMPARE_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(600,20): warning FS1172: Infix operator member '...>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ($) = "DOLLAR"
|
||||
-------------------^
|
||||
|
||||
stdin(602,20): warning FS1172: Infix operator member '$' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS1172: Infix operator member '<' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (<) = "LESS"
|
||||
-------------------^
|
||||
|
||||
stdin(603,20): warning FS0086: The name '(<)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_LessThan' instead.
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS1172: Infix operator member '>' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (>) = "GREATER"
|
||||
-------------------^
|
||||
|
||||
stdin(604,20): warning FS0086: The name '(>)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name 'op_GreaterThan' instead.
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS1172: Infix operator member '@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (@) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(605,20): warning FS0086: The name '(@)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS1172: Infix operator member '^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (^) = "INFIX_AT_HAT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(606,20): warning FS0086: The name '(^)' should not be used as a member name because it is given a standard definition in the F# library over fixed types
|
||||
|
||||
static member (...@) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(607,20): warning FS1172: Infix operator member '...@' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (...^) = "INFIX_AT_HAT_OP" // with $. prefix
|
||||
-------------------^^^^
|
||||
|
||||
stdin(608,20): warning FS1172: Infix operator member '...^' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (%) = "PERCENT_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(609,20): warning FS1172: Infix operator member '%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (-) = "MINUS"
|
||||
-------------------^
|
||||
|
||||
stdin(611,20): warning FS1172: Infix operator member '-' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( * ) = "STAR"
|
||||
--------------------^
|
||||
|
||||
stdin(612,21): warning FS1172: Infix operator member '*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member (/) = "INFIX_STAR_DIV_MOD_OP"
|
||||
-------------------^
|
||||
|
||||
stdin(614,20): warning FS1172: Infix operator member '/' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...* ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(616,21): warning FS1172: Infix operator member '...*' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( .../ ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(617,21): warning FS1172: Infix operator member '.../' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ...% ) = "INFIX_STAR_DIV_MOD_OP" // with $. prefix
|
||||
--------------------^^^^
|
||||
|
||||
stdin(618,21): warning FS1172: Infix operator member '...%' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
static member ( ** ) = "INFIX_STAR_STAR_OP"
|
||||
--------------------^^
|
||||
|
||||
stdin(619,21): warning FS1172: Infix operator member '**' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ...
|
||||
|
||||
member this.ToString() = "ABC"
|
||||
----------------^^^^^^^^
|
||||
|
||||
stdin(624,17): warning FS0864: This new member hides the abstract member 'System.Object.ToString() : string'. Rename the member or use 'override' instead.
|
||||
|
||||
member this.M() = "string"
|
||||
----------------^
|
||||
|
||||
stdin(765,17): error FS0438: Duplicate method. The method 'M' has the same name and signature as another method in this type.
|
||||
|
||||
member this.P = "string"
|
||||
----------------^
|
||||
|
||||
stdin(772,17): error FS0438: Duplicate method. The method 'get_P' has the same name and signature as another method in this type.
|
||||
|
||||
type public IBPublic = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(779,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
type internal IBInternal = interface inherit IAPrivate abstract Q : int end
|
||||
------------------^^^^^^^^^^
|
||||
|
||||
stdin(784,19): error FS0410: The type 'IAPrivate' is less accessible than the value, member or type 'IBInternal' it is used in
|
||||
|
||||
type public IBPublic = interface inherit IAInternal abstract Q : int end
|
||||
------------------^^^^^^^^
|
||||
|
||||
stdin(793,19): error FS0410: The type 'IAInternal' is less accessible than the value, member or type 'IBPublic' it is used in
|
||||
|
||||
override x.M(a:string) = 1
|
||||
-------------------^
|
||||
|
||||
stdin(825,20): error FS0361: The override 'M : string -> int' implements more than one abstract slot, e.g. 'abstract member Regression4232.D.M : 'U -> int' and 'abstract member Regression4232.D.M : 'T -> int'
|
||||
|
||||
let (|A|B|) (x:int) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(833,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (x:'a) = A x;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(836,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) (p:'a) (x:int) = A p;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(839,6): error FS1210: Active pattern '|A|B|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
|
||||
|
||||
let (|A|B|) = failwith "" : Choice<int,int>;;
|
||||
-----^^^^^
|
||||
|
||||
stdin(845,6): error FS1209: Active pattern '|A|B|' is not a function
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -15,7 +15,7 @@ open System.Reflection
|
|||
module FileVersionInfoTest =
|
||||
|
||||
[<Test; FSharpSuiteTest()>]
|
||||
let ``should set file version info on generated file`` () = check (processor {
|
||||
let ``should set file version info on generated file`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let fscToLibrary = Printf.ksprintf (FscCommand.fscToLibrary dir (Command.exec dir cfg.EnvironmentVariables) cfg.FSC)
|
||||
|
@ -59,7 +59,7 @@ open System.Runtime.InteropServices
|
|||
fv.LegalCopyright |> Assert.areEqual "Copyright \u00A9 Compressed Space Transport 2380"
|
||||
fv.LegalTrademarks |> Assert.areEqual "CST \u2122"
|
||||
|
||||
result.OutText
|
||||
result.StderrText
|
||||
|> FscCommand.parseFscOut
|
||||
|> List.choose (function FscCommand.FscOutputLine.Warning(w,e) -> Some w | _ -> None)
|
||||
|> Assert.areEqual []
|
||||
|
|
|
@ -27,7 +27,7 @@ module ProductVersionTest =
|
|||
|> List.map (fun (a,f,i,e) -> FSharpSuiteTestCaseData(Commands.createTempDir(), a, f, i, e))
|
||||
|
||||
[<TestCaseSource("fallbackTestData")>]
|
||||
let ``should use correct fallback`` assemblyVersion fileVersion infoVersion expected = check (processor {
|
||||
let ``should use correct fallback`` assemblyVersion fileVersion infoVersion expected = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let fscToLibrary = Printf.ksprintf (fun flags -> FscCommand.fscToLibrary dir (Command.exec dir cfg.EnvironmentVariables) cfg.FSC flags)
|
||||
|
|
|
@ -15,7 +15,7 @@ open System.Reflection
|
|||
module FS2003 =
|
||||
|
||||
[<Test; FSharpSuiteTest()>]
|
||||
let ``should be raised if AssemblyInformationalVersion has invalid version`` () = check (processor {
|
||||
let ``should be raised if AssemblyInformationalVersion has invalid version`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let fscToLibrary = Printf.ksprintf (FscCommand.fscToLibrary dir (Command.exec dir cfg.EnvironmentVariables) cfg.FSC)
|
||||
|
@ -43,7 +43,7 @@ open System.Reflection
|
|||
|> Assert.areEqual (45,2048,0,0)
|
||||
|
||||
let w =
|
||||
result.OutText
|
||||
result.StderrText
|
||||
|> FscCommand.parseFscOut
|
||||
|> List.tryFind (function FscCommand.FscOutputLine.Warning ("FS2003", desc) -> true | _ -> false)
|
||||
|
||||
|
|
|
@ -13,17 +13,16 @@ let checkTestResult result =
|
|||
match result with
|
||||
| Success () -> ()
|
||||
| Failure (GenericError msg) -> Assert.Fail (msg)
|
||||
| Failure (ProcessExecError (err, msg)) -> Assert.Fail (sprintf "ERRORLEVEL %i %s" err msg)
|
||||
| Failure (ProcessExecError (msg1, err, msg2)) -> Assert.Fail (sprintf "%s. ERRORLEVEL %i %s" msg1 err msg2)
|
||||
| Failure (Skipped msg) -> Assert.Ignore(sprintf "skipped. Reason: %s" msg)
|
||||
|
||||
let checkResult result =
|
||||
match result with
|
||||
| CmdResult.ErrorLevel err -> let x = err, (sprintf "ERRORLEVEL %d" err) in Failure (RunError.ProcessExecError x)
|
||||
| CmdResult.ErrorLevel (msg1, err) -> Failure (RunError.ProcessExecError (msg1, err, sprintf "ERRORLEVEL %d" err))
|
||||
| CmdResult.Success -> Success ()
|
||||
|
||||
let skip msg () = Failure (Skipped msg)
|
||||
let genericError msg () = Failure (GenericError msg)
|
||||
let errorLevel exitCode msg () = Failure (ProcessExecError (exitCode,msg))
|
||||
|
||||
let envVars () =
|
||||
System.Environment.GetEnvironmentVariables ()
|
||||
|
@ -32,7 +31,7 @@ let envVars () =
|
|||
|> Map.ofSeq
|
||||
|
||||
let defaultConfigurationName =
|
||||
#if !DEBUG
|
||||
#if DEBUG
|
||||
DEBUG
|
||||
#else
|
||||
RELEASE
|
||||
|
@ -65,7 +64,7 @@ let initializeSuite () =
|
|||
| Some confName -> confName
|
||||
| None -> configurationName
|
||||
|
||||
processor {
|
||||
attempt {
|
||||
do! updateCmd env { Configuration = configurationName; Ngen = doNgen; }
|
||||
|> Attempt.Run
|
||||
|> function Success () -> Success () | Failure msg -> genericError msg ()
|
||||
|
@ -81,7 +80,7 @@ let initializeSuite () =
|
|||
|
||||
let directoryExists = Commands.directoryExists (Path.GetTempPath()) >> Option.isSome
|
||||
|
||||
let checkfscBinPath () = processor {
|
||||
let checkfscBinPath () = attempt {
|
||||
|
||||
let fscBinPath = cfg.EnvironmentVariables |> Map.tryFind "FSCBINPATH"
|
||||
return!
|
||||
|
@ -91,7 +90,7 @@ let initializeSuite () =
|
|||
| Some dir -> genericError (sprintf "environment variable 'FSCBinPath' is required to be a valid directory, but is '%s'" dir)
|
||||
}
|
||||
|
||||
let smokeTest () = processor {
|
||||
let smokeTest () = attempt {
|
||||
let tempFile ext =
|
||||
let p = Path.ChangeExtension( Path.GetTempFileName(), ext)
|
||||
File.AppendAllText (p, """printfn "ciao"; exit 0""")
|
||||
|
@ -242,26 +241,65 @@ type FSharpSuiteTestCaseAttribute =
|
|||
this.Properties |> FSharpTestSuite.setProps dir
|
||||
|
||||
|
||||
type FSharpSuitePermutationsAttribute(dir: string) =
|
||||
let allPermutations =
|
||||
[ FSI_FILE;
|
||||
FSI_STDIN;
|
||||
FSI_STDIN_OPT;
|
||||
FSI_STDIN_GUI;
|
||||
FSC_BASIC;
|
||||
GENERATED_SIGNATURE;
|
||||
FSC_OPT_MINUS_DEBUG;
|
||||
FSC_OPT_PLUS_DEBUG;
|
||||
SPANISH;
|
||||
AS_DLL]
|
||||
|
||||
let codeAndInferencePermutations =
|
||||
[ GENERATED_SIGNATURE;
|
||||
FSI_FILE;
|
||||
FSC_OPT_PLUS_DEBUG;
|
||||
AS_DLL ]
|
||||
|
||||
let codePermutations =
|
||||
[ FSI_FILE;
|
||||
FSC_OPT_PLUS_DEBUG; ]
|
||||
|
||||
let slowLibCodePermutations =
|
||||
[ FSC_OPT_PLUS_DEBUG; ]
|
||||
|
||||
let BuildFrom(dir, builder:NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder, methodInfo, suite, permutations: Permutation list) =
|
||||
permutations
|
||||
|> List.map (fun p -> (new FSharpSuiteTestCaseData (dir, p)))
|
||||
|> List.map (fun tc -> builder.BuildTestMethod(methodInfo, suite, tc))
|
||||
|> Seq.ofList
|
||||
|
||||
type FSharpSuiteAllPermutationsAttribute(dir: string) =
|
||||
inherit NUnitAttribute()
|
||||
|
||||
let _builder = NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder()
|
||||
interface NUnit.Framework.Interfaces.ITestBuilder with
|
||||
member x.BuildFrom(methodInfo, suite) =
|
||||
let allPermutations =
|
||||
[ FSI_FILE; FSI_STDIN; FSI_STDIN_OPT; FSI_STDIN_GUI;
|
||||
FSC_BASIC; FSC_HW; FSC_O3;
|
||||
GENERATED_SIGNATURE; EMPTY_SIGNATURE; EMPTY_SIGNATURE_OPT;
|
||||
FSC_OPT_MINUS_DEBUG; FSC_OPT_PLUS_DEBUG;
|
||||
FRENCH; SPANISH;
|
||||
AS_DLL;
|
||||
WRAPPER_NAMESPACE; WRAPPER_NAMESPACE_OPT
|
||||
]
|
||||
|> List.map (fun p -> (new FSharpSuiteTestCaseData (dir, p)))
|
||||
member x.BuildFrom(methodInfo, suite) = BuildFrom(dir, _builder, methodInfo, suite, allPermutations)
|
||||
|
||||
type FSharpSuiteCodeAndSignaturePermutationsAttribute(dir: string) =
|
||||
inherit NUnitAttribute()
|
||||
|
||||
let _builder = NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder()
|
||||
interface NUnit.Framework.Interfaces.ITestBuilder with
|
||||
member x.BuildFrom(methodInfo, suite) = BuildFrom(dir, _builder, methodInfo, suite, codeAndInferencePermutations)
|
||||
|
||||
type FSharpSuiteScriptPermutationsAttribute(dir: string) =
|
||||
inherit NUnitAttribute()
|
||||
|
||||
let _builder = NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder()
|
||||
interface NUnit.Framework.Interfaces.ITestBuilder with
|
||||
member x.BuildFrom(methodInfo, suite) = BuildFrom(dir, _builder, methodInfo, suite, codePermutations)
|
||||
|
||||
type FSharpSuiteFscCodePermutationAttribute(dir: string) =
|
||||
inherit NUnitAttribute()
|
||||
|
||||
let _builder = NUnit.Framework.Internal.Builders.NUnitTestCaseBuilder()
|
||||
interface NUnit.Framework.Interfaces.ITestBuilder with
|
||||
member x.BuildFrom(methodInfo, suite) = BuildFrom(dir, _builder, methodInfo, suite, slowLibCodePermutations)
|
||||
|
||||
allPermutations
|
||||
|> List.map (fun tc -> _builder.BuildTestMethod(methodInfo, suite, tc))
|
||||
|> Seq.ofList
|
||||
|
||||
module FileGuard =
|
||||
let private remove path = if File.Exists(path) then Commands.rm (Path.GetTempPath()) path
|
||||
|
@ -280,7 +318,7 @@ module FileGuard =
|
|||
let exists (guard: T) = guard.Path |> File.Exists
|
||||
|
||||
|
||||
let checkGuardExists guard = processor {
|
||||
let checkGuardExists guard = attempt {
|
||||
if not <| (guard |> FileGuard.exists)
|
||||
then return! genericError (sprintf "exit code 0 but %s file doesn't exists" (guard.Path |> Path.GetFileName))
|
||||
}
|
||||
|
@ -297,7 +335,8 @@ type RedirectInfo =
|
|||
and RedirectTo =
|
||||
| Inherit
|
||||
| Output of RedirectToType
|
||||
| OutputAndError of RedirectToType
|
||||
| OutputAndError of RedirectToType * RedirectToType
|
||||
| OutputAndErrorToSameFile of RedirectToType
|
||||
| Error of RedirectToType
|
||||
|
||||
and RedirectToType =
|
||||
|
@ -320,7 +359,8 @@ module Command =
|
|||
function
|
||||
| Inherit -> ""
|
||||
| Output r-> sprintf " 1%s" (redirectType r)
|
||||
| OutputAndError r -> sprintf " 1%s 2>&1" (redirectType r)
|
||||
| OutputAndError (r1, r2) -> sprintf " 1%s 2%s" (redirectType r1) (redirectType r2)
|
||||
| OutputAndErrorToSameFile r -> sprintf " 1%s 2>1" (redirectType r)
|
||||
| Error r -> sprintf " 2%s" (redirectType r)
|
||||
sprintf "%s%s%s%s" path (match args with "" -> "" | x -> " " + x) (inF redirect.Input) (outF redirect.Output)
|
||||
|
||||
|
@ -364,7 +404,13 @@ module Command =
|
|||
use outFile = redirectTo writer
|
||||
use toLog = redirectToLog ()
|
||||
fCont { cmdArgs with RedirectOutput = Some (outFile.Post); RedirectError = Some (toLog.Post) }
|
||||
| OutputAndError r ->
|
||||
| OutputAndError (r1,r2) ->
|
||||
use writer1 = openWrite r1
|
||||
use writer2 = openWrite r2
|
||||
use outFile1 = redirectTo writer1
|
||||
use outFile2 = redirectTo writer2
|
||||
fCont { cmdArgs with RedirectOutput = Some (outFile1.Post); RedirectError = Some (outFile2.Post) }
|
||||
| OutputAndErrorToSameFile r ->
|
||||
use writer = openWrite r
|
||||
use outFile = redirectTo writer
|
||||
fCont { cmdArgs with RedirectOutput = Some (outFile.Post); RedirectError = Some (outFile.Post) }
|
||||
|
@ -402,7 +448,7 @@ module FscCommand =
|
|||
|
||||
type FscToLibraryResult = {
|
||||
OutLibraryFullPath: FilePath
|
||||
OutText: string list
|
||||
StderrText: string list
|
||||
}
|
||||
|
||||
let private parseFscOutLine line =
|
||||
|
@ -419,11 +465,11 @@ module FscCommand =
|
|||
|
||||
let parseFscOut = List.map parseFscOutLine
|
||||
|
||||
let fscToLibrary dir exec (fscExe: FilePath) flags (args: FscToLibraryArgs) = processor {
|
||||
let ``exec >a`` a p = exec { RedirectInfo.Output = OutputAndError(a); Input = None; } p >> checkResult
|
||||
let fscToLibrary dir exec (fscExe: FilePath) flags (args: FscToLibraryArgs) = attempt {
|
||||
let ``exec 2>a`` a p = exec { RedirectInfo.Output = RedirectTo.Error(a); Input = None; } p >> checkResult
|
||||
|
||||
let outStream = Path.GetTempFileName ()
|
||||
let fsc = Printf.ksprintf (Commands.fsc (``exec >a`` (Overwrite(outStream))) fscExe)
|
||||
let fsc = Printf.ksprintf (Commands.fsc (``exec 2>a`` (Overwrite(outStream))) fscExe)
|
||||
|
||||
let sourceFiles =
|
||||
args.SourceFiles
|
||||
|
@ -450,5 +496,5 @@ module FscCommand =
|
|||
let outText = File.ReadAllLines(outStream) |> List.ofArray
|
||||
|
||||
return { FscToLibraryResult.OutLibraryFullPath = (Commands.getfullpath dir outDll)
|
||||
OutText = outText }
|
||||
StderrText = outText }
|
||||
}
|
||||
|
|
|
@ -14,22 +14,22 @@ module Analyses =
|
|||
|
||||
let ``fsc >a 2>&1`` cfg dir =
|
||||
let ``exec >a 2>&1`` outFile p =
|
||||
Command.exec dir cfg.EnvironmentVariables { Output = OutputAndError(Overwrite(outFile)); Input = None; } p
|
||||
Command.exec dir cfg.EnvironmentVariables { Output = OutputAndErrorToSameFile(Overwrite(outFile)); Input = None; } p
|
||||
>> checkResult
|
||||
Printf.ksprintf (fun flags sources out -> Commands.fsc (``exec >a 2>&1`` out) cfg.FSC flags sources)
|
||||
|
||||
let fsdiff cfg dir a b = processor {
|
||||
let fsdiff cfg dir a b = attempt {
|
||||
let out = new ResizeArray<string>()
|
||||
let redirectOutputToFile path args =
|
||||
log "%s %s" path args
|
||||
let toLog = redirectToLog ()
|
||||
use toLog = redirectToLog ()
|
||||
Process.exec { RedirectOutput = Some (function null -> () | s -> out.Add(s)); RedirectError = Some toLog.Post; RedirectInput = None; } dir cfg.EnvironmentVariables path args
|
||||
do! (Commands.fsdiff redirectOutputToFile cfg.FSDIFF a b) |> (fun _ -> Success ())
|
||||
return out.ToArray() |> List.ofArray
|
||||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/analyses")>]
|
||||
let functionSizes () = check (processor {
|
||||
let functionSizes () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let getfullpath = Commands.getfullpath dir
|
||||
|
@ -55,7 +55,7 @@ module Analyses =
|
|||
})
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/analyses")>]
|
||||
let totalSizes () = check (processor {
|
||||
let totalSizes () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let ``fsc >a 2>&1`` = ``fsc >a 2>&1`` cfg dir
|
||||
|
@ -81,7 +81,7 @@ module Analyses =
|
|||
})
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/analyses")>]
|
||||
let hasEffect () = check (processor {
|
||||
let hasEffect () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let ``fsc >a 2>&1`` = ``fsc >a 2>&1`` cfg dir
|
||||
|
@ -107,7 +107,7 @@ module Analyses =
|
|||
})
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/analyses")>]
|
||||
let noNeedToTailcall () = check (processor {
|
||||
let noNeedToTailcall () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let ``fsc >a 2>&1`` = ``fsc >a 2>&1`` cfg dir
|
||||
|
@ -137,7 +137,7 @@ module Analyses =
|
|||
|
||||
module Inline =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
|
@ -163,7 +163,7 @@ module Inline =
|
|||
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let ildasm = Printf.ksprintf (Commands.ildasm exec cfg.ILDASM)
|
||||
|
@ -211,7 +211,7 @@ module Inline =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/inline")>]
|
||||
let ``inline`` () = check (processor {
|
||||
let ``inline`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -223,7 +223,7 @@ module Inline =
|
|||
module Stats =
|
||||
|
||||
[<Test; FSharpSuiteTest("optimize/stats")>]
|
||||
let stats () = check (processor {
|
||||
let stats () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
|
|
@ -13,8 +13,8 @@ let testContext = FSharpTestSuite.testContext
|
|||
|
||||
module Graph =
|
||||
|
||||
[<Test; FSharpSuitePermutations("perf/graph")>]
|
||||
let graph p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("perf/graph")>]
|
||||
let graph p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -25,8 +25,8 @@ module Graph =
|
|||
|
||||
module Nbody =
|
||||
|
||||
[<Test; FSharpSuitePermutations("perf/nbody")>]
|
||||
let nbody p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("perf/nbody")>]
|
||||
let nbody p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
|
|
@ -13,8 +13,8 @@ let testContext = FSharpTestSuite.testContext
|
|||
|
||||
module ``26`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/26")>]
|
||||
let ``26`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/26")>]
|
||||
let ``26`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -25,8 +25,8 @@ module ``26`` =
|
|||
|
||||
module ``321`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/321")>]
|
||||
let ``321`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/321")>]
|
||||
let ``321`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -37,11 +37,11 @@ module ``321`` =
|
|||
|
||||
module ``655`` =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// "%FSC%" %fsc_flags% -a -o:pack.dll xlibC.ml
|
||||
do! fsc "%s -a -o:pack.dll" cfg.fsc_flags ["xlibC.ml"]
|
||||
|
@ -57,7 +57,7 @@ module ``655`` =
|
|||
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fileguard = (Commands.getfullpath dir) >> FileGuard.create
|
||||
|
@ -73,7 +73,7 @@ module ``655`` =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("regression/655")>]
|
||||
let ``655`` () = check (processor {
|
||||
let ``655`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -85,11 +85,11 @@ module ``655`` =
|
|||
|
||||
module ``656`` =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// "%FSC%" %fsc_flags% -o:pack.exe misc.fs mathhelper.fs filehelper.fs formshelper.fs plot.fs traj.fs playerrecord.fs trackedplayers.fs form.fs
|
||||
do! fsc "%s -o:pack.exe" cfg.fsc_flags ["misc.fs mathhelper.fs filehelper.fs formshelper.fs plot.fs traj.fs playerrecord.fs trackedplayers.fs form.fs"]
|
||||
|
@ -98,7 +98,7 @@ module ``656`` =
|
|||
do! peverify "pack.exe"
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fileguard = (Commands.getfullpath dir) >> FileGuard.create
|
||||
|
@ -114,7 +114,7 @@ module ``656`` =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("regression/656")>]
|
||||
let ``656`` () = check (processor {
|
||||
let ``656`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -127,8 +127,8 @@ module ``656`` =
|
|||
|
||||
module ``83`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/83")>]
|
||||
let ``83`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/83")>]
|
||||
let ``83`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
// if "%CLR_SUPPORTS_WINFORMS%"=="false" ( goto Skip)
|
||||
|
@ -155,8 +155,8 @@ module ``83`` =
|
|||
|
||||
module ``84`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/84")>]
|
||||
let ``84`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/84")>]
|
||||
let ``84`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -167,11 +167,11 @@ module ``84`` =
|
|||
|
||||
module ``85`` =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// if "%CLR_SUPPORTS_GENERICS%"=="false" ( goto Skip)
|
||||
do! match cfg.EnvironmentVariables |> Map.tryFind "CLR_SUPPORTS_GENERICS" |> Option.map (fun s -> s.ToLower()) with
|
||||
|
@ -192,7 +192,7 @@ module ``85`` =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("regression/85")>]
|
||||
let ``85`` () = check (processor {
|
||||
let ``85`` () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -204,8 +204,8 @@ module ``85`` =
|
|||
|
||||
module ``86`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/86")>]
|
||||
let ``86`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/86")>]
|
||||
let ``86`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -216,8 +216,8 @@ module ``86`` =
|
|||
|
||||
module ``Tuple-bug-1`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("regression/tuple-bug-1")>]
|
||||
let ``tuple-bug-1`` p = check (processor {
|
||||
[<Test; FSharpSuiteFscCodePermutation("regression/tuple-bug-1")>]
|
||||
let ``tuple-bug-1`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
|
|
@ -8,7 +8,7 @@ open PlatformHelpers
|
|||
open NUnitConf
|
||||
open FSharpTestSuiteTypes
|
||||
|
||||
let private singleNegTest' (cfg: TestConfig) workDir testname = processor {
|
||||
let private singleNegTestAux (cfg: TestConfig) workDir testname = attempt {
|
||||
|
||||
// call %~d0%~p0..\config.bat
|
||||
ignore "from arguments"
|
||||
|
@ -40,22 +40,13 @@ let private singleNegTest' (cfg: TestConfig) workDir testname = processor {
|
|||
ignore "from arguments"
|
||||
|
||||
// REM == Set baseline (fsc vs vs, in case the vs baseline exists)
|
||||
let BSLFILE =
|
||||
let VSBSLFILE =
|
||||
// IF EXIST %testname%.vsbsl (set BSLFILE=%testname%.vsbsl)
|
||||
// IF NOT EXIST %testname%.vsbsl (set BSLFILE=%testname%.bsl)
|
||||
if (sprintf "%s.vsbsl" testname) |> fileExists
|
||||
then sprintf "%s.vsbsl" testname
|
||||
else sprintf "%s.bsl" testname
|
||||
|
||||
// %FSDIFF% %~f0 %~f0
|
||||
// @if ERRORLEVEL 1 (
|
||||
// set ERRORMSG=%ERRORMSG% FSDIFF likely not found;
|
||||
// goto Error
|
||||
// )
|
||||
|
||||
//REVIEW move to suite smoke tests like fsc/fsi?
|
||||
do! fsdiff BSLFILE BSLFILE
|
||||
|
||||
// set sources=
|
||||
// if exist "%testname%.mli" (set sources=%sources% %testname%.mli)
|
||||
// if exist "%testname%.fsi" (set sources=%sources% %testname%.fsi)
|
||||
|
@ -71,22 +62,21 @@ let private singleNegTest' (cfg: TestConfig) workDir testname = processor {
|
|||
// if exist "%testname%b.ml" (set sources=%sources% %testname%b.ml)
|
||||
// if exist "%testname%b.fs" (set sources=%sources% %testname%b.fs)
|
||||
let sources = [
|
||||
let src =
|
||||
[ testname + ".mli"; testname + ".fsi"; testname + ".ml"; testname + ".fs"; testname + ".fsx";
|
||||
testname + "a.mli"; testname + "a.fsi"; testname + "a.ml"; testname + "a.fs";
|
||||
testname + "b.mli"; testname + "b.fsi"; testname + "b.ml"; testname + "b.fs" ]
|
||||
let src = [ testname + ".mli"; testname + ".fsi"; testname + ".ml"; testname + ".fs"; testname + ".fsx";
|
||||
testname + "a.mli"; testname + "a.fsi"; testname + "a.ml"; testname + "a.fs";
|
||||
testname + "b.mli"; testname + "b.fsi"; testname + "b.ml"; testname + "b.fs"; ]
|
||||
|
||||
yield! src |> List.filter fileExists
|
||||
|
||||
// if exist "helloWorldProvider.dll" (set sources=%sources% -r:helloWorldProvider.dll)
|
||||
if fileExists "helloWorldProvider.dll"
|
||||
then yield "-r:helloWorldProvider.dll"
|
||||
if fileExists "helloWorldProvider.dll" then
|
||||
yield "-r:helloWorldProvider.dll"
|
||||
|
||||
// if exist "%testname%-pre.fs" (
|
||||
// set sources=%sources% -r:%testname%-pre.dll
|
||||
// )
|
||||
if fileExists (testname + "-pre.fs")
|
||||
then yield (sprintf "-r:%s-pre.dll" testname)
|
||||
if fileExists (testname + "-pre.fs") then
|
||||
yield (sprintf "-r:%s-pre.dll" testname)
|
||||
|
||||
]
|
||||
|
||||
|
@ -118,16 +108,16 @@ let private singleNegTest' (cfg: TestConfig) workDir testname = processor {
|
|||
// )
|
||||
let ``exec 2>`` errPath = Command.exec workDir cfg.EnvironmentVariables { Output = Error(Overwrite(errPath)); Input = None }
|
||||
let checkErrorLevel1 = function
|
||||
| CmdResult.ErrorLevel 1 -> Success
|
||||
| CmdResult.ErrorLevel (_,1) -> Success
|
||||
| CmdResult.Success | CmdResult.ErrorLevel _ -> NUnitConf.genericError (sprintf "FSC passed unexpectedly for %A" sources)
|
||||
|
||||
Printf.ksprintf (fun flags sources errPath -> Commands.fsc (``exec 2>`` errPath) cfg.FSC flags sources |> checkErrorLevel1)
|
||||
|
||||
let fsdiff a b = processor {
|
||||
let fsdiff a b = attempt {
|
||||
let out = new ResizeArray<string>()
|
||||
let redirectOutputToFile path args =
|
||||
log "%s %s" path args
|
||||
let toLog = redirectToLog ()
|
||||
use toLog = redirectToLog ()
|
||||
Process.exec { RedirectOutput = Some (function null -> () | s -> out.Add(s)); RedirectError = Some toLog.Post; RedirectInput = None; } workDir cfg.EnvironmentVariables path args
|
||||
do! (Commands.fsdiff redirectOutputToFile cfg.FSDIFF a b) |> checkResult
|
||||
return out.ToArray() |> List.ofArray
|
||||
|
@ -159,19 +149,19 @@ let private singleNegTest' (cfg: TestConfig) workDir testname = processor {
|
|||
// )
|
||||
|
||||
// %FSDIFF% %testname%.vserr %BSLFILE% > %testname%.vsdiff
|
||||
let! testnameDiff = fsdiff (sprintf "%s.vserr" testname) BSLFILE
|
||||
let! testnameDiff = fsdiff (sprintf "%s.vserr" testname) VSBSLFILE
|
||||
|
||||
// for /f %%c IN (%testname%.vsdiff) do (
|
||||
do! match testnameDiff with
|
||||
| [] -> Success
|
||||
| l ->
|
||||
// echo ***** %testname%.vserr %BSLFILE% differed: a bug or baseline may neeed updating
|
||||
log "***** %s.vserr %s differed: a bug or baseline may neeed updating" testname BSLFILE
|
||||
log "***** %s.vserr %s differed: a bug or baseline may neeed updating" testname VSBSLFILE
|
||||
// set ERRORMSG=%ERRORMSG% %testname%.vserr %BSLFILE% differ;
|
||||
NUnitConf.genericError (sprintf "%s.vserr %s differ; %A" testname BSLFILE l)
|
||||
NUnitConf.genericError (sprintf "%s.vserr %s differ; %A" testname VSBSLFILE l)
|
||||
|
||||
// echo Good, output %testname%.vserr matched %BSLFILE%
|
||||
log "Good, output %s.vserr matched %s" testname BSLFILE
|
||||
log "Good, output %s.vserr matched %s" testname VSBSLFILE
|
||||
// )
|
||||
}
|
||||
|
||||
|
@ -209,11 +199,11 @@ let singleNegTest =
|
|||
// goto :EOF
|
||||
|
||||
let flow cfg workDir testname () =
|
||||
singleNegTest' cfg workDir testname
|
||||
singleNegTestAux cfg workDir testname
|
||||
|> Attempt.Run
|
||||
|> function
|
||||
| Success () -> doneOK ()
|
||||
| Failure (Skipped msg) -> doneSkipped workDir msg ()
|
||||
| Failure (GenericError msg) -> doneError (GenericError msg) msg
|
||||
| Failure (ProcessExecError (err,msg)) -> doneError (ProcessExecError(err,msg)) msg
|
||||
| Failure (ProcessExecError (_,_,msg) as err) -> doneError err msg
|
||||
flow
|
||||
|
|
|
@ -42,29 +42,17 @@ let singleTestBuild cfg testDir =
|
|||
//if exist test.ml (set sources=%sources% test.ml)
|
||||
//if exist test.fsi (set sources=%sources% test.fsi)
|
||||
//if exist test.fs (set sources=%sources% test.fs)
|
||||
//if exist test2.mli (set sources=%sources% test2.mli)
|
||||
//if exist test2.ml (set sources=%sources% test2.ml)
|
||||
//if exist test2.fsi (set sources=%sources% test2.fsi)
|
||||
//if exist test2.fs (set sources=%sources% test2.fs)
|
||||
//if exist test.fsx (set sources=%sources% test.fsx)
|
||||
//if exist test2.fsx (set sources=%sources% test2.fsx)
|
||||
let sources =
|
||||
["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.mli";"test2.ml";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
|
||||
["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
|
||||
|> List.filter fileExists
|
||||
|
||||
//set sourceshw=
|
||||
//if exist test-hw.mli (set sourceshw=%sourceshw% test-hw.mli)
|
||||
//if exist test-hw.ml (set sourceshw=%sourceshw% test-hw.ml)
|
||||
//if exist test-hw.fsx (set sourceshw=%sourceshw% test-hw.fsx)
|
||||
//if exist test2-hw.mli (set sourceshw=%sourceshw% test2-hw.mli)
|
||||
//if exist test2-hw.ml (set sourceshw=%sourceshw% test2-hw.ml)
|
||||
//if exist test2-hw.fsx (set sourceshw=%sourceshw% test2-hw.fsx)
|
||||
let sourceshw =
|
||||
["test-hw.mli";"test-hw.ml";"test-hw.fsx";"test2-hw.mli";"test2-hw.ml";"test2-hw.fsx"]
|
||||
|> List.filter fileExists
|
||||
|
||||
//rem to run the 64 bit version of the code set FSC_BASIC_64=FSC_BASIC_64
|
||||
//set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% FSC_HW FSC_O3 GENERATED_SIGNATURE EMPTY_SIGNATURE EMPTY_SIGNATURE_OPT FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG FRENCH SPANISH AS_DLL WRAPPER_NAMESPACE WRAPPER_NAMESPACE_OPT
|
||||
//set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% GENERATED_SIGNATURE FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG SPANISH AS_DLL
|
||||
|
||||
//if "%REDUCED_RUNTIME%"=="1" (
|
||||
// echo REDUCED_RUNTIME set
|
||||
|
@ -103,7 +91,7 @@ let singleTestBuild cfg testDir =
|
|||
let type_append_tofile = Commands.type_append_tofile testDir
|
||||
let fsc = Printf.ksprintf (fun flags -> Commands.fsc exec cfg.FSC flags)
|
||||
let fsc_flags = cfg.fsc_flags
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
let ``echo._tofile`` = Commands.``echo._tofile`` testDir
|
||||
|
||||
//:Ok
|
||||
|
@ -139,12 +127,12 @@ let singleTestBuild cfg testDir =
|
|||
//set NonexistentErrorLevel 2> nul
|
||||
//goto Error
|
||||
|
||||
let skipIfExists file = processor {
|
||||
let skipIfExists file = attempt {
|
||||
if fileExists file
|
||||
then return! NUnitConf.skip (sprintf "file '%s' found" file)
|
||||
}
|
||||
|
||||
let skipIfNotExists file = processor {
|
||||
let skipIfNotExists file = attempt {
|
||||
if not (fileExists file)
|
||||
then return! NUnitConf.skip (sprintf "file '%s' not found" file)
|
||||
}
|
||||
|
@ -155,18 +143,18 @@ let singleTestBuild cfg testDir =
|
|||
/// @if ERRORLEVEL 1 goto Error <para/>
|
||||
/// ) <para/>
|
||||
/// </summary>
|
||||
let doPeverify cmd = processor {
|
||||
let doPeverify cmd = attempt {
|
||||
do! skipIfExists "dont.run.peverify"
|
||||
|
||||
do! peverify cmd
|
||||
}
|
||||
|
||||
let doNOOP () = processor {
|
||||
let doNOOP () = attempt {
|
||||
//@echo No build action to take for this permutation
|
||||
log "No build action to take for this permutation"
|
||||
}
|
||||
|
||||
let doBasic () = processor {
|
||||
let doBasic () = attempt {
|
||||
// FSC %fsc_flags% --define:BASIC_TEST -o:test.exe -g %sources%
|
||||
//if ERRORLEVEL 1 goto Error
|
||||
do! fsc "%s --define:BASIC_TEST -o:test.exe -g" fsc_flags sources
|
||||
|
@ -178,7 +166,7 @@ let singleTestBuild cfg testDir =
|
|||
do! doPeverify "test.exe"
|
||||
}
|
||||
|
||||
let doBasic64 () = processor {
|
||||
let doBasic64 () = attempt {
|
||||
// "%FSC%" %fsc_flags% --define:BASIC_TEST --platform:x64 -o:testX64.exe -g %sources%
|
||||
do! fsc "%s --define:BASIC_TEST --platform:x64 -o:testX64.exe -g" fsc_flags sources
|
||||
|
||||
|
@ -188,112 +176,77 @@ let singleTestBuild cfg testDir =
|
|||
do! doPeverify "testX64.exe"
|
||||
}
|
||||
|
||||
let doFscHW () = processor {
|
||||
// if exist test-hw.* (
|
||||
if Directory.EnumerateFiles(testDir, "test-hw.*") |> Seq.exists fileExists then
|
||||
// "%FSC%" %fsc_flags% -o:test-hw.exe -g %sourceshw%
|
||||
do! fsc "%s -o:test-hw.exe -g" fsc_flags sourceshw
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" test-hw.exe
|
||||
// )
|
||||
do! doPeverify "test-hw.exe"
|
||||
//)
|
||||
else
|
||||
do! NUnitConf.skip (sprintf "file '%s' not found" "test-hw.*")
|
||||
}
|
||||
|
||||
let doFscO3 () = processor {
|
||||
//"%FSC%" %fsc_flags% --optimize --define:PERF -o:test--optimize.exe -g %sources%
|
||||
do! fsc "%s --optimize --define:PERF -o:test--optimize.exe -g" fsc_flags sources
|
||||
//if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" test--optimize.exe
|
||||
//)
|
||||
do! doPeverify "test--optimize.exe"
|
||||
}
|
||||
|
||||
let doGeneratedSignature () = processor {
|
||||
let doGeneratedSignature () = attempt {
|
||||
//if NOT EXIST dont.use.generated.signature (
|
||||
do! skipIfExists "dont.use.generated.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// echo Generating interface file...
|
||||
log "Generating interface file..."
|
||||
// copy /y %source1% tmptest.ml
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest.ml")
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest.fs")
|
||||
// REM NOTE: use --generate-interface-file since results may be in Unicode
|
||||
// "%FSC%" %fsc_flags% --sig:tmptest.mli tmptest.ml
|
||||
do! fsc "%s --sig:tmptest.mli" fsc_flags ["tmptest.ml"]
|
||||
do! fsc "%s --sig:tmptest.fsi" fsc_flags ["tmptest.fs"]
|
||||
|
||||
// echo Compiling against generated interface file...
|
||||
log "Compiling against generated interface file..."
|
||||
// "%FSC%" %fsc_flags% -o:tmptest1.exe tmptest.mli tmptest.ml
|
||||
do! fsc "%s -o:tmptest1.exe" fsc_flags ["tmptest.mli";"tmptest.ml"]
|
||||
// "%FSC%" %fsc_flags% -o:tmptest1.exe tmptest.fsi tmptest.fs
|
||||
do! fsc "%s -o:tmptest1.exe" fsc_flags ["tmptest.fsi";"tmptest.fs"]
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" tmptest1.exe
|
||||
// )
|
||||
do! doPeverify "tmptest1.exe"
|
||||
}
|
||||
|
||||
let doEmptySignature () = processor {
|
||||
let doEmptySignature () = attempt {
|
||||
//if NOT EXIST dont.use.empty.signature (
|
||||
do! skipIfExists "dont.use.empty.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
// if exist test.fs (
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// echo Compiling against empty interface file...
|
||||
log "Compiling against empty interface file..."
|
||||
// echo // empty file > tmptest2.mli
|
||||
echo_tofile "// empty file " "tmptest2.mli"
|
||||
// copy /y %source1% tmptest2.ml
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest2.ml")
|
||||
// "%FSC%" %fsc_flags% --define:COMPILING_WITH_EMPTY_SIGNATURE -o:tmptest2.exe tmptest2.mli tmptest2.ml
|
||||
do! fsc "%s --define:COMPILING_WITH_EMPTY_SIGNATURE -o:tmptest2.exe" fsc_flags ["tmptest2.mli";"tmptest2.ml"]
|
||||
// echo // empty file > tmptest2.fsi
|
||||
echo_tofile "// empty file " "tmptest2.fsi"
|
||||
// copy /y %source1% tmptest2.fs
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest2.fs")
|
||||
// "%FSC%" %fsc_flags% --define:COMPILING_WITH_EMPTY_SIGNATURE -o:tmptest2.exe tmptest2.fsi tmptest2.fs
|
||||
do! fsc "%s --define:COMPILING_WITH_EMPTY_SIGNATURE -o:tmptest2.exe" fsc_flags ["tmptest2.fsi";"tmptest2.fs"]
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" tmptest2.exe
|
||||
// )
|
||||
do! doPeverify "tmptest2.exe"
|
||||
}
|
||||
|
||||
|
||||
let doEmptySignatureOpt () = processor {
|
||||
let doEmptySignatureOpt () = attempt {
|
||||
//if NOT EXIST dont.use.empty.signature (
|
||||
do! skipIfExists "dont.use.empty.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
// if exist test.fs (
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// echo Compiling against empty interface file...
|
||||
log "Compiling against empty interface file..."
|
||||
// echo // empty file > tmptest2.mli
|
||||
echo_tofile "// empty file " "tmptest2.mli"
|
||||
// copy /y %source1% tmptest2.ml
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest2.ml")
|
||||
// "%FSC%" %fsc_flags% --define:COMPILING_WITH_EMPTY_SIGNATURE --optimize -o:tmptest2--optimize.exe tmptest2.mli tmptest2.ml
|
||||
do! fsc "%s --define:COMPILING_WITH_EMPTY_SIGNATURE --optimize -o:tmptest2--optimize.exe" fsc_flags ["tmptest2.mli";"tmptest2.ml"]
|
||||
// echo // empty file > tmptest2.fsi
|
||||
echo_tofile "// empty file " "tmptest2.fsi"
|
||||
// copy /y %source1% tmptest2.fs
|
||||
do! source1 |> Option.map (fun from -> copy_y from "tmptest2.fs")
|
||||
// "%FSC%" %fsc_flags% --define:COMPILING_WITH_EMPTY_SIGNATURE --optimize -o:tmptest2--optimize.exe tmptest2.fsi tmptest2.fs
|
||||
do! fsc "%s --define:COMPILING_WITH_EMPTY_SIGNATURE --optimize -o:tmptest2--optimize.exe" fsc_flags ["tmptest2.fsi";"tmptest2.fs"]
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" tmptest2--optimize.exe
|
||||
// )
|
||||
do! doPeverify "tmptest2--optimize.exe"
|
||||
}
|
||||
|
||||
let doOptFscMinusDebug () = processor {
|
||||
let doOptFscMinusDebug () = attempt {
|
||||
// "%FSC%" %fsc_flags% --optimize- --debug -o:test--optminus--debug.exe -g %sources%
|
||||
do! fsc "%s --optimize- --debug -o:test--optminus--debug.exe -g" fsc_flags sources
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" test--optminus--debug.exe
|
||||
// )
|
||||
do! doPeverify "test--optminus--debug.exe"
|
||||
}
|
||||
|
||||
let doOptFscPlusDebug () = processor {
|
||||
let doOptFscPlusDebug () = attempt {
|
||||
// "%FSC%" %fsc_flags% --optimize+ --debug -o:test--optplus--debug.exe -g %sources%
|
||||
do! fsc "%s --optimize+ --debug -o:test--optplus--debug.exe -g" fsc_flags sources
|
||||
|
||||
|
@ -303,7 +256,7 @@ let singleTestBuild cfg testDir =
|
|||
do! doPeverify "test--optplus--debug.exe"
|
||||
}
|
||||
|
||||
let doAsDLL () = processor {
|
||||
let doAsDLL () = attempt {
|
||||
//REM Compile as a DLL to exercise pickling of interface data, then recompile the original source file referencing this DLL
|
||||
//REM THe second compilation will not utilize the information from the first in any meaningful way, but the
|
||||
//REM compiler will unpickle the interface and optimization data, so we test unpickling as well.
|
||||
|
@ -328,47 +281,40 @@ let singleTestBuild cfg testDir =
|
|||
do! doPeverify "test--optimize-client-of-lib.exe"
|
||||
}
|
||||
|
||||
let doWrapperNamespace () = processor {
|
||||
let doWrapperNamespace () = attempt {
|
||||
// if NOT EXIST dont.use.wrapper.namespace (
|
||||
do! skipIfExists "dont.use.wrapper.namespace"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// echo Compiling when wrapped in a namespace declaration...
|
||||
log "Compiling when wrapped in a namespace declaration..."
|
||||
// echo module TestNamespace.TestModule > tmptest3.ml
|
||||
echo_tofile "module TestNamespace.TestModule " "tmptest3.ml"
|
||||
// type %source1% >> tmptest3.ml
|
||||
source1 |> Option.iter (fun from -> type_append_tofile from "tmptest3.ml")
|
||||
// "%FSC%" %fsc_flags% -o:tmptest3.exe tmptest3.ml
|
||||
do! fsc "%s -o:tmptest3.exe" fsc_flags ["tmptest3.ml"]
|
||||
// echo module TestNamespace.TestModule > tmptest3.fs
|
||||
echo_tofile "module TestNamespace.TestModule " "tmptest3.fs"
|
||||
// type %source1% >> tmptest3.fs
|
||||
source1 |> Option.iter (fun from -> type_append_tofile from "tmptest3.fs")
|
||||
// "%FSC%" %fsc_flags% -o:tmptest3.exe tmptest3.fs
|
||||
do! fsc "%s -o:tmptest3.exe" fsc_flags ["tmptest3.fs"]
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" tmptest3.exe
|
||||
// )
|
||||
do! doPeverify "tmptest3.exe"
|
||||
}
|
||||
|
||||
let doWrapperNamespaceOpt () = processor {
|
||||
let doWrapperNamespaceOpt () = attempt {
|
||||
//if NOT EXIST dont.use.wrapper.namespace (
|
||||
do! skipIfExists "dont.use.wrapper.namespace"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
// if exist test.fs (
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// echo Compiling when wrapped in a namespace declaration...
|
||||
log "Compiling when wrapped in a namespace declaration..."
|
||||
// echo module TestNamespace.TestModule > tmptest3.ml
|
||||
echo_tofile "module TestNamespace.TestModule " "tmptest3.ml"
|
||||
// type %source1% >> tmptest3.ml
|
||||
source1 |> Option.iter (fun from -> type_append_tofile from "tmptest3.ml")
|
||||
// "%FSC%" %fsc_flags% --optimize -o:tmptest3--optimize.exe tmptest3.ml
|
||||
do! fsc "%s --optimize -o:tmptest3--optimize.exe" fsc_flags ["tmptest3.ml"]
|
||||
// echo module TestNamespace.TestModule > tmptest3.fs
|
||||
echo_tofile "module TestNamespace.TestModule " "tmptest3.fs"
|
||||
// type %source1% >> tmptest3.fs
|
||||
source1 |> Option.iter (fun from -> type_append_tofile from "tmptest3.fs")
|
||||
// "%FSC%" %fsc_flags% --optimize -o:tmptest3--optimize.exe tmptest3.fs
|
||||
do! fsc "%s --optimize -o:tmptest3--optimize.exe" fsc_flags ["tmptest3.fs"]
|
||||
|
||||
// if NOT EXIST dont.run.peverify (
|
||||
// "%PEVERIFY%" tmptest3--optimize.exe
|
||||
// )
|
||||
do! doPeverify "tmptest3--optimize.exe"
|
||||
}
|
||||
|
||||
|
@ -377,20 +323,13 @@ let singleTestBuild cfg testDir =
|
|||
| FSI_STDIN -> doNOOP
|
||||
| FSI_STDIN_OPT -> doNOOP
|
||||
| FSI_STDIN_GUI -> doNOOP
|
||||
| FRENCH -> doBasic
|
||||
| SPANISH -> doBasic
|
||||
| FSC_BASIC -> doBasic
|
||||
| FSC_BASIC_64 -> doBasic64
|
||||
| FSC_HW -> doFscHW
|
||||
| FSC_O3 -> doFscO3
|
||||
| GENERATED_SIGNATURE -> doGeneratedSignature
|
||||
| EMPTY_SIGNATURE -> doEmptySignature
|
||||
| EMPTY_SIGNATURE_OPT -> doEmptySignatureOpt
|
||||
| FSC_OPT_MINUS_DEBUG -> doOptFscMinusDebug
|
||||
| FSC_OPT_PLUS_DEBUG -> doOptFscPlusDebug
|
||||
| AS_DLL -> doAsDLL
|
||||
| WRAPPER_NAMESPACE -> doWrapperNamespace
|
||||
| WRAPPER_NAMESPACE_OPT -> doWrapperNamespaceOpt
|
||||
|
||||
let flow p () =
|
||||
build p ()
|
||||
|
@ -398,7 +337,7 @@ let singleTestBuild cfg testDir =
|
|||
|> function
|
||||
| Success () -> doneOk ()
|
||||
| Failure (Skipped msg) -> doneSkipped msg ()
|
||||
| Failure (GenericError msg) -> doneError (GenericError msg) msg
|
||||
| Failure (ProcessExecError (err,msg)) -> doneError (ProcessExecError(err,msg)) msg
|
||||
| Failure (GenericError msg as err) -> doneError err msg
|
||||
| Failure (ProcessExecError (_,_,msg) as err) -> doneError err msg
|
||||
|
||||
flow
|
||||
|
|
|
@ -20,34 +20,17 @@ let private singleTestRun' cfg testDir =
|
|||
// if exist test.ml (set sources=%sources% test.ml)
|
||||
// if exist test.fsi (set sources=%sources% test.fsi)
|
||||
// if exist test.fs (set sources=%sources% test.fs)
|
||||
// if exist test2.mli (set sources=%sources% test2.mli)
|
||||
// if exist test2.ml (set sources=%sources% test2.ml)
|
||||
// if exist test2.fsi (set sources=%sources% test2.fsi)
|
||||
// if exist test2.fs (set sources=%sources% test2.fs)
|
||||
// if exist test.fsx (set sources=%sources% test.fsx)
|
||||
// if exist test2.fsx (set sources=%sources% test2.fsx)
|
||||
let sources =
|
||||
["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.mli";"test2.ml";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
|
||||
|> List.filter fileExists
|
||||
|
||||
// set sourceshw=
|
||||
// if exist test-hw.mli (set sourceshw=%sourceshw% test-hw.mli)
|
||||
// if exist test-hw.ml (set sourceshw=%sourceshw% test-hw.ml)
|
||||
// if exist test2-hw.mli (set sourceshw=%sourceshw% test2-hw.mli)
|
||||
// if exist test2-hw.ml (set sourceshw=%sourceshw% test2-hw.ml)
|
||||
// if exist test-hw.fsi (set sourceshw=%sourceshw% test-hw.fsi)
|
||||
// if exist test-hw.fs (set sourceshw=%sourceshw% test-hw.fs)
|
||||
// if exist test2-hw.fsi (set sourceshw=%sourceshw% test2-hw.fsi)
|
||||
// if exist test2-hw.fs (set sourceshw=%sourceshw% test2-hw.fs)
|
||||
// if exist test-hw.fsx (set sourceshw=%sourceshw% test-hw.fsx)
|
||||
// if exist test2-hw.fsx (set sourceshw=%sourceshw% test2-hw.fsx)
|
||||
let sourceshw =
|
||||
["test-hw.mli";"test-hw.ml";"test2-hw.mli";"test2-hw.ml";"test-hw.fsi";"test-hw.fs";"test2-hw.fsi";"test2-hw.fs";"test-hw.fsx";"test2-hw.fsx"]
|
||||
["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"]
|
||||
|> List.filter fileExists
|
||||
|
||||
// :START
|
||||
|
||||
// set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% FSC_HW FSC_O3 GENERATED_SIGNATURE EMPTY_SIGNATURE EMPTY_SIGNATURE_OPT FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG FRENCH SPANISH AS_DLL WRAPPER_NAMESPACE WRAPPER_NAMESPACE_OPT
|
||||
// set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% FSC_HW FSC_O3 GENERATED_SIGNATURE FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG SPANISH AS_DLL
|
||||
//
|
||||
// if "%REDUCED_RUNTIME%"=="1" (
|
||||
// echo REDUCED_RUNTIME set
|
||||
|
@ -98,12 +81,12 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
let createTestOkFile () = NUnitConf.FileGuard.create (getfullpath "test.ok")
|
||||
|
||||
let skipIfExists file = processor {
|
||||
let skipIfExists file = attempt {
|
||||
if fileExists file
|
||||
then return! NUnitConf.skip (sprintf "file '%s' found" file)
|
||||
}
|
||||
|
||||
let skipIfNotExists file = processor {
|
||||
let skipIfNotExists file = attempt {
|
||||
if not (fileExists file)
|
||||
then return! NUnitConf.skip (sprintf "file '%s' not found" file)
|
||||
}
|
||||
|
@ -111,7 +94,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSI_STDIN
|
||||
// @echo do :FSI_STDIN
|
||||
let runFSI_STDIN () = processor {
|
||||
let runFSI_STDIN () = attempt {
|
||||
// if NOT EXIST dont.pipe.to.stdin (
|
||||
do! skipIfExists "dont.pipe.to.stdin"
|
||||
|
||||
|
@ -129,7 +112,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSI_STDIN_OPT
|
||||
// @echo do :FSI_STDIN_OPT
|
||||
let runFSI_STDIN_OPT () = processor {
|
||||
let runFSI_STDIN_OPT () = attempt {
|
||||
// if NOT EXIST dont.pipe.to.stdin (
|
||||
do! skipIfExists "dont.pipe.to.stdin"
|
||||
|
||||
|
@ -147,7 +130,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSI_STDIN_GUI
|
||||
// @echo do :FSI_STDIN_GUI
|
||||
let runFSI_STDIN_GUI () = processor {
|
||||
let runFSI_STDIN_GUI () = attempt {
|
||||
// if NOT EXIST dont.pipe.to.stdin (
|
||||
do! skipIfExists "dont.pipe.to.stdin"
|
||||
|
||||
|
@ -165,7 +148,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSI_FILE
|
||||
// @echo do :FSI_FILE
|
||||
let runFSI_FILE () = processor {
|
||||
let runFSI_FILE () = attempt {
|
||||
// if NOT EXIST dont.run.as.script (
|
||||
do! skipIfExists "dont.run.as.script"
|
||||
|
||||
|
@ -183,7 +166,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSC_BASIC
|
||||
// @echo do :FSC_BASIC
|
||||
let runFSC_BASIC () = processor {
|
||||
let runFSC_BASIC () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test.exe && (
|
||||
|
@ -197,7 +180,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSC_BASIC_64
|
||||
// @echo do :FSC_BASIC_64
|
||||
let runFSC_BASIC_64 () = processor {
|
||||
let runFSC_BASIC_64 () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\testX64.exe && (
|
||||
|
@ -209,28 +192,9 @@ let private singleTestRun' cfg testDir =
|
|||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
}
|
||||
|
||||
// :FSC_HW
|
||||
// @echo do :FSC_HW
|
||||
let runFSC_HW () = processor {
|
||||
// if exist test-hw.* (
|
||||
if Directory.EnumerateFiles(testDir, "test-hw.*") |> Seq.exists fileExists then
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test-hw.exe && (
|
||||
do! exec ("."/"test-hw.exe") ""
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :FSC_HW failed
|
||||
// set ERRORMSG=%ERRORMSG% FSC_HW failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
//)
|
||||
else
|
||||
do! NUnitConf.skip (sprintf "file '%s' not found" "test-hw.*")
|
||||
}
|
||||
|
||||
// :FSC_O3
|
||||
// @echo do :FSC_O3
|
||||
let runFSC_O3 () = processor {
|
||||
let runFSC_O3 () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test--optimize.exe && (
|
||||
|
@ -244,7 +208,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSC_OPT_MINUS_DEBUG
|
||||
// @echo do :FSC_OPT_MINUS_DEBUG
|
||||
let runFSC_OPT_MINUS_DEBUG () = processor {
|
||||
let runFSC_OPT_MINUS_DEBUG () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test--optminus--debug.exe && (
|
||||
|
@ -258,7 +222,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :FSC_OPT_PLUS_DEBUG
|
||||
// @echo do :FSC_OPT_PLUS_DEBUG
|
||||
let runFSC_OPT_PLUS_DEBUG () = processor {
|
||||
let runFSC_OPT_PLUS_DEBUG () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test--optplus--debug.exe && (
|
||||
|
@ -272,12 +236,12 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :GENERATED_SIGNATURE
|
||||
// @echo do :GENERATED_SIGNATURE
|
||||
let runGENERATED_SIGNATURE () = processor {
|
||||
let runGENERATED_SIGNATURE () = attempt {
|
||||
// if NOT EXIST dont.use.generated.signature (
|
||||
do! skipIfExists "dont.use.generated.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
// if exist test.fs (
|
||||
do! skipIfNotExists "test.fs"
|
||||
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
|
@ -292,67 +256,9 @@ let private singleTestRun' cfg testDir =
|
|||
//)
|
||||
}
|
||||
|
||||
// :EMPTY_SIGNATURE
|
||||
// @echo do :EMPTY_SIGNATURE
|
||||
let runEMPTY_SIGNATURE () = processor {
|
||||
// if NOT EXIST dont.use.empty.signature (
|
||||
do! skipIfExists "dont.use.empty.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% tmptest2.exe && (
|
||||
do! exec ("."/"tmptest2.exe") ""
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :EMPTY_SIGNATURE failed
|
||||
// set ERRORMSG=%ERRORMSG% FSC_EMPTY_SIGNATURE failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
// )
|
||||
//)
|
||||
}
|
||||
|
||||
// :EMPTY_SIGNATURE_OPT
|
||||
// @echo do :EMPTY_SIGNATURE_OPT
|
||||
let runEMPTY_SIGNATURE_OPT () = processor {
|
||||
// if NOT EXIST dont.use.empty.signature (
|
||||
do! skipIfExists "dont.use.empty.signature"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% tmptest2--optimize.exe && (
|
||||
do! exec ("."/"tmptest2--optimize.exe") ""
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :EMPTY_SIGNATURE_OPT --optimize failed
|
||||
// set ERRORMSG=%ERRORMSG% EMPTY_SIGNATURE_OPT --optimize failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
// )
|
||||
//)
|
||||
}
|
||||
|
||||
// :FRENCH
|
||||
// @echo do :FRENCH
|
||||
let runFRENCH () = processor {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test.exe fr-FR && (
|
||||
do! exec ("."/"test.exe") "fr-FR"
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :FRENCH failed
|
||||
// set ERRORMSG=%ERRORMSG% FRENCH failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
}
|
||||
|
||||
// :SPANISH
|
||||
// @echo do :SPANISH
|
||||
let runSPANISH () = processor {
|
||||
let runSPANISH () = attempt {
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\test.exe es-ES && (
|
||||
|
@ -366,7 +272,7 @@ let private singleTestRun' cfg testDir =
|
|||
|
||||
// :AS_DLL
|
||||
// @echo do :AS_DLL
|
||||
let runAS_DLL () = processor {
|
||||
let runAS_DLL () = attempt {
|
||||
//if NOT EXIST dont.compile.test.as.dll (
|
||||
do! skipIfExists "dont.compile.test.as.dll"
|
||||
|
||||
|
@ -382,69 +288,18 @@ let private singleTestRun' cfg testDir =
|
|||
//)
|
||||
}
|
||||
|
||||
// :WRAPPER_NAMESPACE
|
||||
// @echo do :WRAPPER_NAMESPACE
|
||||
let runWRAPPER_NAMESPACE () = processor {
|
||||
// if NOT EXIST dont.use.wrapper.namespace (
|
||||
do! skipIfExists "dont.use.wrapper.namespace"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\tmptest3.exe && (
|
||||
do! exec ("."/"tmptest3.exe") ""
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :WRAPPER_NAMESPACE failed
|
||||
// set ERRORMSG=%ERRORMSG% WRAPPER_NAMESPACE failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
// )
|
||||
//)
|
||||
}
|
||||
|
||||
// :WRAPPER_NAMESPACE_OPT
|
||||
// @echo do :WRAPPER_NAMESPACE_OPT
|
||||
let runWRAPPER_NAMESPACE_OPT () = processor {
|
||||
// if NOT EXIST dont.use.wrapper.namespace (
|
||||
do! skipIfExists "dont.use.wrapper.namespace"
|
||||
|
||||
// if exist test.ml (
|
||||
do! skipIfNotExists "test.ml"
|
||||
|
||||
// if exist test.ok (del /f /q test.ok)
|
||||
use testOkFile = createTestOkFile ()
|
||||
// %CLIX% .\tmptest3--optimize.exe && (
|
||||
do! exec ("."/"tmptest3--optimize.exe") ""
|
||||
// dir test.ok > NUL 2>&1 ) || (
|
||||
// @echo :WRAPPER_NAMESPACE_OPT failed
|
||||
// set ERRORMSG=%ERRORMSG% WRAPPER_NAMESPACE_OPT failed;
|
||||
// )
|
||||
do! testOkFile |> NUnitConf.checkGuardExists
|
||||
// )
|
||||
// )
|
||||
}
|
||||
|
||||
let run = function
|
||||
| FSI_FILE -> runFSI_FILE
|
||||
| FSI_STDIN -> runFSI_STDIN
|
||||
| FSI_STDIN_OPT -> runFSI_STDIN_OPT
|
||||
| FSI_STDIN_GUI -> runFSI_STDIN_GUI
|
||||
| FRENCH -> runFRENCH
|
||||
| SPANISH -> runSPANISH
|
||||
| FSC_BASIC -> runFSC_BASIC
|
||||
| FSC_BASIC_64 -> runFSC_BASIC_64
|
||||
| FSC_HW -> runFSC_HW
|
||||
| FSC_O3 -> runFSC_O3
|
||||
| GENERATED_SIGNATURE -> runGENERATED_SIGNATURE
|
||||
| EMPTY_SIGNATURE -> runEMPTY_SIGNATURE
|
||||
| EMPTY_SIGNATURE_OPT -> runEMPTY_SIGNATURE_OPT
|
||||
| FSC_OPT_MINUS_DEBUG -> runFSC_OPT_MINUS_DEBUG
|
||||
| FSC_OPT_PLUS_DEBUG -> runFSC_OPT_PLUS_DEBUG
|
||||
| AS_DLL -> runAS_DLL
|
||||
| WRAPPER_NAMESPACE -> runWRAPPER_NAMESPACE
|
||||
| WRAPPER_NAMESPACE_OPT -> runWRAPPER_NAMESPACE_OPT
|
||||
|
||||
run
|
||||
|
||||
|
@ -479,12 +334,12 @@ let singleTestRun config testDir =
|
|||
//exit /b %ERRORLEVEL%
|
||||
Failure (err)
|
||||
|
||||
let skipIfNotExists file = processor {
|
||||
let skipIfNotExists file = attempt {
|
||||
if not (fileExists file)
|
||||
then return! NUnitConf.skip (sprintf "file '%s' not found" file)
|
||||
}
|
||||
|
||||
let tests config p = processor {
|
||||
let tests config p = attempt {
|
||||
//dir build.ok > NUL ) || (
|
||||
// @echo 'build.ok' not found.
|
||||
// set ERRORMSG=%ERRORMSG% Skipped because 'build.ok' not found.
|
||||
|
@ -521,7 +376,7 @@ let singleTestRun config testDir =
|
|||
| Success () -> doneOK ()
|
||||
| Failure (Skipped msg) -> doneSkipped msg
|
||||
| Failure (GenericError msg) -> doneError (GenericError msg) msg
|
||||
| Failure (ProcessExecError (err,msg)) -> doneError (ProcessExecError(err,msg)) msg
|
||||
| Failure (ProcessExecError (_,_,msg) as err) -> doneError err msg
|
||||
|
||||
|
||||
flow
|
||||
|
|
|
@ -14,12 +14,12 @@ let testContext = FSharpTestSuite.testContext
|
|||
module Bundle =
|
||||
|
||||
[<Test; FSharpSuiteTest("tools/bundle")>]
|
||||
let bundle () = check (processor {
|
||||
let bundle () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// "%FSC%" %fsc_flags% --progress --standalone -o:test-one-fsharp-module.exe -g test-one-fsharp-module.fs
|
||||
do! fsc "%s --progress --standalone -o:test-one-fsharp-module.exe -g" cfg.fsc_flags ["test-one-fsharp-module.fs"]
|
||||
|
@ -52,8 +52,8 @@ module Bundle =
|
|||
|
||||
module Eval =
|
||||
|
||||
[<Test; FSharpSuitePermutations("tools/eval")>]
|
||||
let eval p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("tools/eval")>]
|
||||
let eval p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
|
|
@ -8,7 +8,7 @@ open FSharpTestSuiteTypes
|
|||
open PlatformHelpers
|
||||
open NUnitConf
|
||||
|
||||
let build (cfg: TestConfig) (dir: string) p = processor {
|
||||
let build (cfg: TestConfig) (dir: string) p = attempt {
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let del = Commands.rm dir
|
||||
|
|
|
@ -8,7 +8,7 @@ open FSharpTestSuiteTypes
|
|||
open PlatformHelpers
|
||||
open NUnitConf
|
||||
|
||||
let copy (cfg: TestConfig) (dir: string) = processor {
|
||||
let copy (cfg: TestConfig) (dir: string) = attempt {
|
||||
let fileExists = Commands.fileExists dir >> Option.isSome
|
||||
let getfullpath = Commands.getfullpath dir
|
||||
|
||||
|
|
|
@ -8,12 +8,16 @@ neg1.fsx(9,38,9,64): typecheck error FS3021: Unexpected exception from provided
|
|||
|
||||
neg1.fsx(9,38,9,64): typecheck error FS3021: Unexpected exception from provided type 'FSharp.EvilProvider.IsArrayTypeRaisesException' member 'IsArray': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
||||
neg1.fsx(9,38,9,64): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsArrayTypeRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(9,38,9,64): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsArrayTypeRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(10,38,10,60): typecheck error FS3013: Provided type 'FSharp.EvilProvider.IsArrayTypeReturnsTrue' has 'IsArray' as true, but array types are not supported.
|
||||
|
||||
neg1.fsx(10,38,10,60): typecheck error FS3013: Provided type 'FSharp.EvilProvider.IsArrayTypeReturnsTrue' has 'IsArray' as true, but array types are not supported.
|
||||
|
||||
neg1.fsx(10,38,10,60): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsArrayTypeReturnsTrue' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(10,38,10,60): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsArrayTypeReturnsTrue' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(11,38,11,66): typecheck error FS3072: The type provider 'Provider.EvilProvider' reported an error: An exception occurred when accessing the 'Name' of a provided type: deliberate error for testing purposes
|
||||
|
@ -60,12 +64,16 @@ neg1.fsx(13,38,13,66): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(13,38,13,66): typecheck error FS3021: Unexpected exception from provided type 'FSharp.EvilProvider.IsGenericTypeRaisesException' member 'IsGenericType': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
||||
neg1.fsx(13,38,13,66): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsGenericTypeRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(13,38,13,66): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsGenericTypeRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(14,38,14,62): typecheck error FS3011: Provided type 'FSharp.EvilProvider.IsGenericTypeReturnsTrue' has 'IsGenericType' as true, but generic types are not supported.
|
||||
|
||||
neg1.fsx(14,38,14,62): typecheck error FS3011: Provided type 'FSharp.EvilProvider.IsGenericTypeReturnsTrue' has 'IsGenericType' as true, but generic types are not supported.
|
||||
|
||||
neg1.fsx(14,38,14,62): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsGenericTypeReturnsTrue' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(14,38,14,62): typecheck error FS3004: The provided type 'FSharp.EvilProvider.IsGenericTypeReturnsTrue' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(15,38,15,70): typecheck error FS3021: Unexpected exception from provided type 'TypeWhereFullNameRaisesException' member 'FullName': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -152,6 +160,8 @@ neg1.fsx(17,38,17,71): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3041: Expected provided type with path 'FSharp.EvilProvider' but provided type has path ''
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereNamespaceRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereNamespaceRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3033: The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -168,6 +178,8 @@ neg1.fsx(17,38,17,71): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3041: Expected provided type with path 'FSharp.EvilProvider' but provided type has path ''
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereNamespaceRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereNamespaceRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(17,38,17,71): typecheck error FS3033: The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -180,6 +192,8 @@ neg1.fsx(19,39,19,67): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3021: Unexpected exception from provided type 'DeclaringTypeRaisesException' member 'DeclaringType': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3004: The provided type 'FSharp.EvilProvider.DeclaringTypeRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3004: The provided type 'FSharp.EvilProvider.DeclaringTypeRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3033: The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -188,6 +202,8 @@ neg1.fsx(19,39,19,67): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3021: Unexpected exception from provided type 'DeclaringTypeRaisesException' member 'DeclaringType': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3004: The provided type 'FSharp.EvilProvider.DeclaringTypeRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3004: The provided type 'FSharp.EvilProvider.DeclaringTypeRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(19,39,19,67): typecheck error FS3033: The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -272,6 +288,8 @@ neg1.fsx(23,39,23,76): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(23,39,23,76): typecheck error FS0039: The type 'TypeWhereGetPropertiesRaisesException' is not defined
|
||||
|
||||
neg1.fsx(24,39,24,77): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetNestedTypesRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(24,39,24,77): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetNestedTypesRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(25,39,25,78): typecheck error FS3021: Unexpected exception from provided type 'FSharp.EvilProvider.TypeWhereGetConstructorsRaisesException' member 'GetConstructors': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
@ -374,6 +392,8 @@ neg1.fsx(30,39,30,72): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1.fsx(30,39,30,72): typecheck error FS0039: The type 'TypeWhereGetPropertiesReturnsNull' is not defined
|
||||
|
||||
neg1.fsx(31,39,31,73): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetNestedTypesReturnsNull' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(31,39,31,73): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetNestedTypesReturnsNull' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(32,39,32,74): typecheck error FS3021: Unexpected exception from provided type 'FSharp.EvilProvider.TypeWhereGetConstructorsReturnsNull' member 'GetConstructors': The type provider 'Provider.EvilProvider' reported an error: The type provider returned 'null', which is not a valid return value from 'GetConstructors'
|
||||
|
@ -400,10 +420,16 @@ neg1.fsx(33,39,33,72): typecheck error FS3042: Unexpected 'null' return value fr
|
|||
|
||||
neg1.fsx(33,39,33,72): typecheck error FS3042: Unexpected 'null' return value from provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesReturnsNull' member 'GetInterfaces'
|
||||
|
||||
neg1.fsx(33,39,33,72): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesReturnsNull' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(33,39,33,72): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesReturnsNull' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(36,38,36,81): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetGenericArgumentsRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(36,38,36,81): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetGenericArgumentsRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(37,38,37,72): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetMembersRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(37,38,37,72): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetMembersRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1.fsx(42,103,42,105): typecheck error FS3045: Invalid static argument to provided type. Expected an argument of kind 'int'.
|
||||
|
|
|
@ -3,4 +3,6 @@ neg1_a.fsx(7,39,7,76): typecheck error FS3021: Unexpected exception from provide
|
|||
|
||||
neg1_a.fsx(7,39,7,76): typecheck error FS3021: Unexpected exception from provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesRaisesException' member 'GetInterfaces': The type provider 'Provider.EvilProvider' reported an error: deliberate error for testing purposes
|
||||
|
||||
neg1_a.fsx(7,39,7,76): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesRaisesException' has member 'Boo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
||||
neg1_a.fsx(7,39,7,76): typecheck error FS3004: The provided type 'FSharp.EvilProvider.TypeWhereGetInterfacesRaisesException' has member 'Foo' which has declaring type 'FSharp.EvilProvider.TheType'. Expected declaring type to be the same as provided type.
|
||||
|
|
|
@ -10,7 +10,7 @@ open PlatformHelpers
|
|||
|
||||
let testContext = FSharpTestSuite.testContext
|
||||
|
||||
let requireVSUltimate cfg = processor {
|
||||
let requireVSUltimate cfg = attempt {
|
||||
do! match cfg.INSTALL_SKU with
|
||||
| Some (Ultimate) -> Success
|
||||
| x ->
|
||||
|
@ -25,8 +25,8 @@ module Builtin =
|
|||
|
||||
module EdmxFile =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/builtin/EdmxFile")>]
|
||||
let EdmxFile p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/builtin/EdmxFile")>]
|
||||
let EdmxFile p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
//call %~d0%~p0..\copyFSharpDataTypeProviderDLL.cmd
|
||||
|
@ -40,8 +40,8 @@ module Builtin =
|
|||
|
||||
module ODataService =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/builtin/ODataService")>]
|
||||
let oDataService p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/builtin/ODataService")>]
|
||||
let oDataService p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
//call %~d0%~p0..\copyFSharpDataTypeProviderDLL.cmd
|
||||
|
@ -55,8 +55,9 @@ module Builtin =
|
|||
|
||||
module SqlDataConnection =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/builtin/SqlDataConnection")>]
|
||||
let sqlDataConnection p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/builtin/SqlDataConnection")>]
|
||||
let sqlDataConnection p = check (attempt {
|
||||
let p = FSC_OPT_PLUS_DEBUG
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
@ -89,8 +90,8 @@ module Builtin =
|
|||
|
||||
module WsdlService =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/builtin/WsdlService")>]
|
||||
let wsdlService p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/builtin/WsdlService")>]
|
||||
let wsdlService p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
//call %~d0%~p0..\copyFSharpDataTypeProviderDLL.cmd
|
||||
|
@ -105,7 +106,7 @@ module Builtin =
|
|||
|
||||
module DiamondAssembly =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
|
@ -134,10 +135,10 @@ module DiamondAssembly =
|
|||
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
let fsi = Printf.ksprintf (Commands.fsi exec cfg.FSI)
|
||||
let fileguard = (Commands.getfullpath dir) >> FileGuard.create
|
||||
|
||||
|
@ -173,7 +174,7 @@ module DiamondAssembly =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("typeProviders/diamondAssembly")>]
|
||||
let diamondAssembly () = check (processor {
|
||||
let diamondAssembly () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -187,7 +188,7 @@ module DiamondAssembly =
|
|||
module GlobalNamespace =
|
||||
|
||||
[<Test; FSharpSuiteTest("typeProviders/globalNamespace")>]
|
||||
let globalNamespace () = check (processor {
|
||||
let globalNamespace () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
@ -205,11 +206,11 @@ module GlobalNamespace =
|
|||
|
||||
module HelloWorld =
|
||||
|
||||
let build cfg dir p = processor {
|
||||
let build cfg dir p = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
let del = Commands.rm dir
|
||||
let execIn workDir p = Command.exec workDir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc' execIn = Printf.ksprintf (Commands.fsc execIn cfg.FSC)
|
||||
|
@ -323,8 +324,8 @@ module HelloWorld =
|
|||
|
||||
}
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/helloWorld")>]
|
||||
let helloWorld p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/helloWorld")>]
|
||||
let helloWorld p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir p
|
||||
|
@ -337,7 +338,7 @@ module HelloWorld =
|
|||
|
||||
module HelloWorldCSharp =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
|
@ -372,10 +373,10 @@ module HelloWorldCSharp =
|
|||
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// "%PEVERIFY%" magic.dll
|
||||
do! peverify "magic.dll"
|
||||
|
@ -392,7 +393,7 @@ module HelloWorldCSharp =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("typeProviders/helloWorldCSharp")>]
|
||||
let helloWorldCSharp () = check (processor {
|
||||
let helloWorldCSharp () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
@ -451,7 +452,7 @@ module NegTests =
|
|||
|> List.map (fun t -> FSharpSuiteTestCaseData("typeProviders/negTests", t))
|
||||
|
||||
[<Test; TestCaseSource("testData")>]
|
||||
let negTests name = check (processor {
|
||||
let negTests name = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
@ -511,41 +512,35 @@ module NegTests =
|
|||
ignore "is a parametrized test, like --withDefine"
|
||||
|
||||
// :Preprocess
|
||||
let preprocess bslppName pref = processor {
|
||||
|
||||
let tempFile = Path.GetTempFileName()
|
||||
|
||||
let ``exec <`` l p = Command.exec dir cfg.EnvironmentVariables { Output = Output(Overwrite(tempFile)); Input = Some(RedirectInput(l)) } p >> checkResult
|
||||
let ``| exec >`` out p = Command.exec dir cfg.EnvironmentVariables { Output = Output(Overwrite(out)); Input = Some(RedirectInput(tempFile)) } p >> checkResult
|
||||
|
||||
let ``fsi <`` = Printf.ksprintf (fun flags l -> Commands.fsi (``exec <`` l) cfg.FSI flags [])
|
||||
let ``| fsi >`` = Printf.ksprintf (fun flags sources out -> Commands.fsi (``| exec >`` out) cfg.FSI flags sources)
|
||||
|
||||
// "%FSI%" --exec sed.fsx "<ASSEMBLY>" "%~d0%~p0provider_%1.dll" < %~1.%~2bslpp
|
||||
do! ``fsi <`` """--exec sed.fsx "<ASSEMBLY>" "%s" """ (getfullpath (sprintf "provider_%s.dll" name)) (sprintf "%s.%sbslpp" bslppName pref)
|
||||
|
||||
// | fsi --exec sed.fsx "<URIPATH>" "file:///%CD%\\" > %~1.%~2bsl
|
||||
do! ``| fsi >`` """--exec sed.fsx "<URIPATH>" "%O" """ (Uri(dir |> Commands.pathAddBackslash)) [] (sprintf "%s.%sbsl" bslppName pref)
|
||||
}
|
||||
let preprocess name pref =
|
||||
attempt {
|
||||
let dirp = (dir |> Commands.pathAddBackslash)
|
||||
do
|
||||
File.ReadAllText(sprintf "%s%s.%sbslpp" dirp name pref)
|
||||
.Replace("<ASSEMBLY>", getfullpath (sprintf "provider_%s.dll" name))
|
||||
.Replace("<URIPATH>",sprintf "file:///%s" dirp)
|
||||
|> fun txt -> File.WriteAllText(sprintf "%s%s.%sbsl" dirp name pref,txt)
|
||||
}
|
||||
|
||||
// :RunTestWithDefine
|
||||
let runTestWithDefine = processor {
|
||||
let runTestWithDefine = attempt {
|
||||
// "%FSC%" --define:%1 --out:provider_%1.dll -a provider.fsx
|
||||
do! fsc (sprintf "--define:%s --out:provider_%s.dll -a" name name) ["provider.fsx"]
|
||||
|
||||
do! if name = "ProviderAttribute_EmptyConsume" || name = "providerAttributeErrorConsume" then Success ()
|
||||
else fsc (sprintf "--define:%s --out:provider_%s.dll -a" name name) ["provider.fsx"]
|
||||
|
||||
// :RunTest
|
||||
// if EXIST %1.bslpp call :Preprocess "%1" ""
|
||||
do! if fileExists (sprintf "%s.bslpp" name)
|
||||
then preprocess name ""
|
||||
do! if fileExists (sprintf "%s.bslpp" name) then preprocess name ""
|
||||
else Success
|
||||
|
||||
// if EXIST %1.vsbslpp call :Preprocess "%1" "vs"
|
||||
do! if fileExists (sprintf "%s.vsbslpp" name)
|
||||
then preprocess name "vs"
|
||||
do! if fileExists (sprintf "%s.vsbslpp" name) then preprocess name "vs"
|
||||
else Success
|
||||
|
||||
// :DoRunTest
|
||||
// call ..\..\single-neg-test.bat %1
|
||||
//let cfg2 = {cfg with fsc_flags = sprintf "%s -r:provider_%s.dll" cfg.fsc_flags name }
|
||||
do! SingleNegTest.singleNegTest cfg dir name
|
||||
|
||||
}
|
||||
|
@ -567,8 +562,8 @@ module NegTests =
|
|||
|
||||
module SplitAssembly =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typeProviders/splitAssembly")>]
|
||||
let splitAssembly p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typeProviders/splitAssembly")>]
|
||||
let splitAssembly p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
@ -589,7 +584,7 @@ module SplitAssembly =
|
|||
|
||||
module WedgeAssembly =
|
||||
|
||||
let build cfg dir = processor {
|
||||
let build cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
|
@ -648,10 +643,10 @@ module WedgeAssembly =
|
|||
|
||||
}
|
||||
|
||||
let run cfg dir = processor {
|
||||
let run cfg dir = attempt {
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
|
||||
// "%PEVERIFY%" test2a.dll
|
||||
do! peverify "test2a.dll"
|
||||
|
@ -668,7 +663,7 @@ module WedgeAssembly =
|
|||
}
|
||||
|
||||
[<Test; FSharpSuiteTest("typeProviders/wedgeAssembly")>]
|
||||
let wedgeAssembly () = check (processor {
|
||||
let wedgeAssembly () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! build cfg dir
|
||||
|
|
|
@ -13,8 +13,8 @@ let testContext = FSharpTestSuite.testContext
|
|||
|
||||
module ``Full-rank-arrays`` =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typecheck/full-rank-arrays")>]
|
||||
let ``full-rank-arrays`` p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typecheck/full-rank-arrays")>]
|
||||
let ``full-rank-arrays`` p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
|
@ -31,8 +31,8 @@ module ``Full-rank-arrays`` =
|
|||
|
||||
module Misc =
|
||||
|
||||
[<Test; FSharpSuitePermutations("typecheck/misc")>]
|
||||
let misc p = check (processor {
|
||||
[<Test; FSharpSuiteScriptPermutations("typecheck/misc")>]
|
||||
let misc p = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
do! SingleTestBuild.singleTestBuild cfg dir p
|
||||
|
@ -44,12 +44,12 @@ module Misc =
|
|||
module Sigs =
|
||||
|
||||
[<Test; FSharpSuiteTest("typecheck/sigs")>]
|
||||
let sigs () = check (processor {
|
||||
let sigs () = check (attempt {
|
||||
let { Directory = dir; Config = cfg } = testContext ()
|
||||
|
||||
let exec p = Command.exec dir cfg.EnvironmentVariables { Output = Inherit; Input = None; } p >> checkResult
|
||||
let fsc = Printf.ksprintf (Commands.fsc exec cfg.FSC)
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY ""
|
||||
let peverify = Commands.peverify exec cfg.PEVERIFY "/nologo"
|
||||
let fsc_flags = cfg.fsc_flags
|
||||
|
||||
let singleNegTest = SingleNegTest.singleNegTest cfg dir
|
||||
|
@ -126,77 +126,18 @@ module Sigs =
|
|||
// "%PEVERIFY%" pos10.dll
|
||||
do! peverify "pos10.dll"
|
||||
|
||||
// call ..\..\single-neg-test.bat neg90
|
||||
// call ..\..\single-neg-test.bat neg89
|
||||
// call ..\..\single-neg-test.bat neg88
|
||||
do! processor.For (["neg90"; "neg89"; "neg88"], singleNegTest)
|
||||
|
||||
// "%FSC%" %fsc_flags% -a -o:pos09.dll pos09.fs
|
||||
do! fsc "%s -a -o:pos09.dll" fsc_flags ["pos09.fs"]
|
||||
|
||||
// "%PEVERIFY%" pos09.dll
|
||||
do! peverify "pos09.dll"
|
||||
|
||||
// call ..\..\single-neg-test.bat neg87
|
||||
// call ..\..\single-neg-test.bat neg86
|
||||
// call ..\..\single-neg-test.bat neg85
|
||||
// call ..\..\single-neg-test.bat neg84
|
||||
// call ..\..\single-neg-test.bat neg83
|
||||
// call ..\..\single-neg-test.bat neg82
|
||||
// call ..\..\single-neg-test.bat neg81
|
||||
// call ..\..\single-neg-test.bat neg80
|
||||
// call ..\..\single-neg-test.bat neg79
|
||||
// call ..\..\single-neg-test.bat neg78
|
||||
// call ..\..\single-neg-test.bat neg77
|
||||
// call ..\..\single-neg-test.bat neg76
|
||||
// call ..\..\single-neg-test.bat neg75
|
||||
// call ..\..\single-neg-test.bat neg74
|
||||
// call ..\..\single-neg-test.bat neg73
|
||||
// call ..\..\single-neg-test.bat neg72
|
||||
// call ..\..\single-neg-test.bat neg71
|
||||
// call ..\..\single-neg-test.bat neg70
|
||||
// call ..\..\single-neg-test.bat neg69
|
||||
// call ..\..\single-neg-test.bat neg68
|
||||
// call ..\..\single-neg-test.bat neg67
|
||||
// call ..\..\single-neg-test.bat neg66
|
||||
// call ..\..\single-neg-test.bat neg65
|
||||
// call ..\..\single-neg-test.bat neg64
|
||||
// call ..\..\single-neg-test.bat neg61
|
||||
// call ..\..\single-neg-test.bat neg63
|
||||
// call ..\..\single-neg-test.bat neg62
|
||||
// call ..\..\single-neg-test.bat neg20
|
||||
// call ..\..\single-neg-test.bat neg24
|
||||
// call ..\..\single-neg-test.bat neg32
|
||||
// call ..\..\single-neg-test.bat neg37
|
||||
// call ..\..\single-neg-test.bat neg37_a
|
||||
// call ..\..\single-neg-test.bat neg60
|
||||
// call ..\..\single-neg-test.bat neg59
|
||||
// call ..\..\single-neg-test.bat neg58
|
||||
// call ..\..\single-neg-test.bat neg57
|
||||
// call ..\..\single-neg-test.bat neg56
|
||||
// call ..\..\single-neg-test.bat neg56_a
|
||||
// call ..\..\single-neg-test.bat neg56_b
|
||||
// call ..\..\single-neg-test.bat neg55
|
||||
// call ..\..\single-neg-test.bat neg54
|
||||
// call ..\..\single-neg-test.bat neg53
|
||||
// call ..\..\single-neg-test.bat neg52
|
||||
// call ..\..\single-neg-test.bat neg51
|
||||
// call ..\..\single-neg-test.bat neg50
|
||||
// call ..\..\single-neg-test.bat neg49
|
||||
// call ..\..\single-neg-test.bat neg48
|
||||
// call ..\..\single-neg-test.bat neg47
|
||||
// call ..\..\single-neg-test.bat neg46
|
||||
// call ..\..\single-neg-test.bat neg10
|
||||
// call ..\..\single-neg-test.bat neg10_a
|
||||
// call ..\..\single-neg-test.bat neg45
|
||||
// call ..\..\single-neg-test.bat neg44
|
||||
// call ..\..\single-neg-test.bat neg43
|
||||
// call ..\..\single-neg-test.bat neg38
|
||||
// call ..\..\single-neg-test.bat neg39
|
||||
// call ..\..\single-neg-test.bat neg40
|
||||
// call ..\..\single-neg-test.bat neg41
|
||||
// call ..\..\single-neg-test.bat neg42
|
||||
do! processor.For (["neg87"; "neg86"; "neg85"; "neg84"; "neg83"; "neg82"; "neg81"; "neg80"; "neg79"; "neg78"; "neg77"; "neg76"; "neg75"; "neg74"; "neg73"; "neg72"; "neg71"; "neg70"; "neg69"; "neg68"; "neg67"; "neg66"; "neg65"; "neg64"; "neg61"; "neg63"; "neg62"; "neg20"; "neg24"; "neg32"; "neg37"; "neg37_a"; "neg60"; "neg59"; "neg58"; "neg57"; "neg56"; "neg56_a"; "neg56_b"; "neg55"; "neg54"; "neg53"; "neg52"; "neg51"; "neg50"; "neg49"; "neg48"; "neg47"; "neg46"; "neg10"; "neg10_a"; "neg45"; "neg44"; "neg43"; "neg38"; "neg39"; "neg40"; "neg41"; "neg42"], singleNegTest)
|
||||
do! attempt.For (["neg90"; "neg89"; "neg88";
|
||||
"neg87"; "neg86"; "neg85"; "neg84"; "neg83"; "neg82"; "neg81"; "neg80"; "neg79"; "neg78"; "neg77"; "neg76"; "neg75";
|
||||
"neg74"; "neg73"; "neg72"; "neg71"; "neg70"; "neg69"; "neg68"; "neg67"; "neg66"; "neg65"; "neg64"; "neg61"; "neg63";
|
||||
"neg62"; "neg20"; "neg24"; "neg32"; "neg37"; "neg37_a"; "neg60"; "neg59"; "neg58"; "neg57"; "neg56"; "neg56_a"; "neg56_b";
|
||||
"neg55"; "neg54"; "neg53"; "neg52"; "neg51"; "neg50"; "neg49"; "neg48"; "neg47"; "neg46"; "neg10"; "neg10_a"; "neg45";
|
||||
"neg44"; "neg43"; "neg38"; "neg39"; "neg40"; "neg41"; "neg42"], singleNegTest)
|
||||
|
||||
// "%FSC%" %fsc_flags% -a -o:pos07.dll pos07.fs
|
||||
do! fsc "%s -a -o:pos07.dll" fsc_flags ["pos07.fs"]
|
||||
|
@ -204,7 +145,6 @@ module Sigs =
|
|||
// "%PEVERIFY%" pos07.dll
|
||||
do! peverify "pos07.dll"
|
||||
|
||||
|
||||
// "%FSC%" %fsc_flags% -a -o:pos08.dll pos08.fs
|
||||
do! fsc "%s -a -o:pos08.dll" fsc_flags ["pos08.fs"]
|
||||
|
||||
|
@ -230,64 +170,12 @@ module Sigs =
|
|||
// "%PEVERIFY%" pos03a.dll
|
||||
do! peverify "pos03a.dll"
|
||||
|
||||
|
||||
// call ..\..\single-neg-test.bat neg34
|
||||
// call ..\..\single-neg-test.bat neg33
|
||||
// call ..\..\single-neg-test.bat neg30
|
||||
// call ..\..\single-neg-test.bat neg31
|
||||
// call ..\..\single-neg-test.bat neg29
|
||||
// call ..\..\single-neg-test.bat neg28
|
||||
// call ..\..\single-neg-test.bat neg07
|
||||
// call ..\..\single-neg-test.bat neg_byref_20
|
||||
// call ..\..\single-neg-test.bat neg_byref_1
|
||||
// call ..\..\single-neg-test.bat neg_byref_2
|
||||
// call ..\..\single-neg-test.bat neg_byref_3
|
||||
// call ..\..\single-neg-test.bat neg_byref_4
|
||||
// call ..\..\single-neg-test.bat neg_byref_5
|
||||
// call ..\..\single-neg-test.bat neg_byref_6
|
||||
// call ..\..\single-neg-test.bat neg_byref_7
|
||||
// call ..\..\single-neg-test.bat neg_byref_8
|
||||
// call ..\..\single-neg-test.bat neg_byref_10
|
||||
// call ..\..\single-neg-test.bat neg_byref_11
|
||||
// call ..\..\single-neg-test.bat neg_byref_12
|
||||
// call ..\..\single-neg-test.bat neg_byref_13
|
||||
// call ..\..\single-neg-test.bat neg_byref_14
|
||||
// call ..\..\single-neg-test.bat neg_byref_15
|
||||
// call ..\..\single-neg-test.bat neg_byref_16
|
||||
// call ..\..\single-neg-test.bat neg_byref_17
|
||||
// call ..\..\single-neg-test.bat neg_byref_18
|
||||
// call ..\..\single-neg-test.bat neg_byref_19
|
||||
// call ..\..\single-neg-test.bat neg_byref_21
|
||||
// call ..\..\single-neg-test.bat neg_byref_22
|
||||
// call ..\..\single-neg-test.bat neg_byref_23
|
||||
// call ..\..\single-neg-test.bat neg36
|
||||
// call ..\..\single-neg-test.bat neg17
|
||||
// call ..\..\single-neg-test.bat neg26
|
||||
// call ..\..\single-neg-test.bat neg27
|
||||
// call ..\..\single-neg-test.bat neg25
|
||||
// call ..\..\single-neg-test.bat neg03
|
||||
// call ..\..\single-neg-test.bat neg23
|
||||
// call ..\..\single-neg-test.bat neg22
|
||||
// call ..\..\single-neg-test.bat neg21
|
||||
// call ..\..\single-neg-test.bat neg04
|
||||
// call ..\..\single-neg-test.bat neg05
|
||||
// call ..\..\single-neg-test.bat neg06
|
||||
// call ..\..\single-neg-test.bat neg06_a
|
||||
// call ..\..\single-neg-test.bat neg06_b
|
||||
// call ..\..\single-neg-test.bat neg08
|
||||
// call ..\..\single-neg-test.bat neg09
|
||||
// call ..\..\single-neg-test.bat neg11
|
||||
// call ..\..\single-neg-test.bat neg12
|
||||
// call ..\..\single-neg-test.bat neg13
|
||||
// call ..\..\single-neg-test.bat neg14
|
||||
// call ..\..\single-neg-test.bat neg16
|
||||
// call ..\..\single-neg-test.bat neg18
|
||||
// call ..\..\single-neg-test.bat neg19
|
||||
// call ..\..\single-neg-test.bat neg01
|
||||
// call ..\..\single-neg-test.bat neg02
|
||||
// call ..\..\single-neg-test.bat neg15
|
||||
|
||||
do! processor.For(["neg34"; "neg33"; "neg30"; "neg31"; "neg29"; "neg28"; "neg07"; "neg_byref_20"; "neg_byref_1"; "neg_byref_2"; "neg_byref_3"; "neg_byref_4"; "neg_byref_5"; "neg_byref_6"; "neg_byref_7"; "neg_byref_8"; "neg_byref_10"; "neg_byref_11"; "neg_byref_12"; "neg_byref_13"; "neg_byref_14"; "neg_byref_15"; "neg_byref_16"; "neg_byref_17"; "neg_byref_18"; "neg_byref_19"; "neg_byref_21"; "neg_byref_22"; "neg_byref_23"; "neg36"; "neg17"; "neg26"; "neg27"; "neg25"; "neg03"; "neg23"; "neg22"; "neg21"; "neg04"; "neg05"; "neg06"; "neg06_a"; "neg06_b"; "neg08"; "neg09"; "neg11"; "neg12"; "neg13"; "neg14"; "neg16"; "neg18"; "neg19"; "neg01"; "neg02"; "neg15" ], singleNegTest)
|
||||
do! attempt.For(["neg34"; "neg33"; "neg30"; "neg31"; "neg29"; "neg28"; "neg07"; "neg_byref_20";
|
||||
"neg_byref_1"; "neg_byref_2"; "neg_byref_3"; "neg_byref_4"; "neg_byref_5"; "neg_byref_6"; "neg_byref_7"; "neg_byref_8";
|
||||
"neg_byref_10"; "neg_byref_11"; "neg_byref_12"; "neg_byref_13"; "neg_byref_14"; "neg_byref_15"; "neg_byref_16";
|
||||
"neg_byref_17"; "neg_byref_18"; "neg_byref_19"; "neg_byref_21"; "neg_byref_22"; "neg_byref_23"; "neg36"; "neg17"; "neg26";
|
||||
"neg27"; "neg25"; "neg03"; "neg23"; "neg22"; "neg21"; "neg04"; "neg05"; "neg06"; "neg06_a"; "neg06_b"; "neg08"; "neg09";
|
||||
"neg11"; "neg12"; "neg13"; "neg14"; "neg16"; "neg18"; "neg19"; "neg01"; "neg02"; "neg15" ], singleNegTest)
|
||||
|
||||
// echo Some random positive cases found while developing the negative tests
|
||||
// "%FSC%" %fsc_flags% -a -o:pos01a.dll pos01a.fsi pos01a.fs
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// #Regression #NoMono #NoMT #CodeGen #EmittedIL #NETFX20Only #NETFX40Only
|
||||
// Regression for Dev11:12545, we were incorrectly inlining calls to LazyExtensions::Force instead of Lazy.Value from mscorlib on 4.0
|
||||
|
||||
open Microsoft.FSharp.Control.LazyExtensions
|
||||
|
||||
let x = lazy(1)
|
||||
|
||||
x.Force() |> ignore
|
|
@ -1,136 +0,0 @@
|
|||
|
||||
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.1
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319
|
||||
.assembly extern mscorlib
|
||||
{
|
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
|
||||
.ver 4:0:0:0
|
||||
}
|
||||
.assembly extern FSharp.Core
|
||||
{
|
||||
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
|
||||
.ver 4:0:0:0
|
||||
}
|
||||
.assembly LazyNoInline01
|
||||
{
|
||||
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
|
||||
int32,
|
||||
int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
|
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment -------
|
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 01 01 00 00 00 00 )
|
||||
|
||||
.hash algorithm 0x00008004
|
||||
.ver 0:0:0:0
|
||||
}
|
||||
.mresource public FSharpSignatureData.LazyNoInline01
|
||||
{
|
||||
// Offset: 0x00000000 Length: 0x000001A8
|
||||
}
|
||||
.mresource public FSharpOptimizationData.LazyNoInline01
|
||||
{
|
||||
// Offset: 0x000001B0 Length: 0x00000074
|
||||
}
|
||||
.module LazyNoInline01.exe
|
||||
// MVID: {4CC2216E-3328-E592-A745-03836E21C24C}
|
||||
.imagebase 0x00400000
|
||||
.file alignment 0x00000200
|
||||
.stackreserve 0x00100000
|
||||
.subsystem 0x0003 // WINDOWS_CUI
|
||||
.corflags 0x00000001 // ILONLY
|
||||
// Image base: 0x00330000
|
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION ===================
|
||||
|
||||
.class public abstract auto ansi sealed LazyNoInline01
|
||||
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 nested assembly beforefieldinit x@3
|
||||
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>
|
||||
{
|
||||
.method assembly specialname rtspecialname
|
||||
instance void .ctor() cil managed
|
||||
{
|
||||
// Code size 7 (0x7)
|
||||
.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,int32>::.ctor()
|
||||
IL_0006: ret
|
||||
} // end of method x@3::.ctor
|
||||
|
||||
.method public strict virtual instance int32
|
||||
Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
|
||||
{
|
||||
// Code size 3 (0x3)
|
||||
.maxstack 5
|
||||
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
|
||||
.line 3,3 : 14,15
|
||||
IL_0000: nop
|
||||
IL_0001: ldc.i4.1
|
||||
IL_0002: ret
|
||||
} // end of method x@3::Invoke
|
||||
|
||||
} // end of class x@3
|
||||
|
||||
.method public specialname static class [mscorlib]System.Lazy`1<int32>
|
||||
get_x() cil managed
|
||||
{
|
||||
// Code size 6 (0x6)
|
||||
.maxstack 4
|
||||
IL_0000: ldsfld class [mscorlib]System.Lazy`1<int32> '<StartupCode$LazyNoInline01>'.$LazyNoInline01::x@3
|
||||
IL_0005: ret
|
||||
} // end of method LazyNoInline01::get_x
|
||||
|
||||
.property class [mscorlib]System.Lazy`1<int32>
|
||||
x()
|
||||
{
|
||||
.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 [mscorlib]System.Lazy`1<int32> LazyNoInline01::get_x()
|
||||
} // end of property LazyNoInline01::x
|
||||
} // end of class LazyNoInline01
|
||||
|
||||
.class private abstract auto ansi sealed '<StartupCode$LazyNoInline01>'.$LazyNoInline01
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.field static assembly class [mscorlib]System.Lazy`1<int32> x@3
|
||||
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
|
||||
.field static assembly int32 init@
|
||||
.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 public static void main@() cil managed
|
||||
{
|
||||
.entrypoint
|
||||
// Code size 32 (0x20)
|
||||
.maxstack 4
|
||||
.locals init ([0] class [mscorlib]System.Lazy`1<int32> x,
|
||||
[1] int32 V_1,
|
||||
[2] int32 V_2)
|
||||
.line 3,3 : 1,16
|
||||
IL_0000: nop
|
||||
IL_0001: newobj instance void LazyNoInline01/x@3::.ctor()
|
||||
IL_0006: call class [mscorlib]System.Lazy`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Create<int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,!!0>)
|
||||
IL_000b: dup
|
||||
IL_000c: stsfld class [mscorlib]System.Lazy`1<int32> '<StartupCode$LazyNoInline01>'.$LazyNoInline01::x@3
|
||||
IL_0011: stloc.0
|
||||
.line 5,5 : 1,20
|
||||
IL_0012: call class [mscorlib]System.Lazy`1<int32> LazyNoInline01::get_x()
|
||||
IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Force<int32>(class [mscorlib]System.Lazy`1<!!0>)
|
||||
IL_001c: stloc.1
|
||||
IL_001d: ldloc.1
|
||||
IL_001e: stloc.2
|
||||
IL_001f: ret
|
||||
} // end of method $LazyNoInline01::main@
|
||||
|
||||
} // end of class '<StartupCode$LazyNoInline01>'.$LazyNoInline01
|
||||
|
||||
|
||||
// =============================================================
|
||||
|
||||
// *********** DISASSEMBLY COMPLETE ***********************
|
|
@ -50,7 +50,4 @@
|
|||
|
||||
SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs
|
||||
|
||||
# Note that unlike other codegen tests this requires --optimize+ since we're testing for the prescence of inlined code
|
||||
ReqPP SOURCE=LazyNoInline01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LazyNoInline01.exe NetFx40" # LazyNoInline01.fs - NetFx40
|
||||
|
||||
SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
// #NoMT #CompilerOptions #RequiresPowerPack
|
||||
namespace LibforfscArgOrder
|
||||
|
||||
type T =
|
||||
static member Member = 1
|
|
@ -16,5 +16,3 @@ NoCrossVer SOURCE=E_RefFSharpCore.fs SCFLAGS="-r FSharp.Core" # E_RefFSharpCo
|
|||
SOURCE=MissingEXE.fsx SCFLAGS="-r:MissingEXE.exe" FSIMODE=EXEC # MissingEXE.fsx (-r:)
|
||||
SOURCE=MissingEXE.fsx SCFLAGS="-r MissingEXE.exe" FSIMODE=EXEC # MissingEXE.fsx (-r )
|
||||
|
||||
ReqPP SOURCE="fscArgOrder.fsi fscArgOrder.fs" SCFLAGS="--define:NO_INSTALLED_ILX_CONFIGS -r:FSharp.PowerPack.dll -r:System.Core.dll -r:FSharp.PowerPack.Linq.dll --nowarn:20 --define:COMPILED --optimize -r:LibforfscArgOrder.dll --target:library -o:dbwlib2.optimize.dll" PRECMD="\$FSC_PIPE -a LibforfscArgOrder.fs" COMPILE_ONLY=1 # fscArgOrder.fs (-r:)
|
||||
ReqPP SOURCE="fscArgOrder.fsi fscArgOrder.fs" SCFLAGS="--define:NO_INSTALLED_ILX_CONFIGS -r FSharp.PowerPack.dll -r:System.Core.dll -r:FSharp.PowerPack.Linq.dll --nowarn:20 --define:COMPILED --optimize -r:LibforfscArgOrder.dll --target:library -o:dbwlib2.optimize.dll" PRECMD="\$FSC_PIPE -a LibforfscArgOrder.fs" COMPILE_ONLY=1 # fscArgOrder.fs (-r )
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// #Regression #NoMT #CompilerOptions #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:4271
|
||||
// Big mistery: compiler does not produce the expected .dll when the command line argruments are rearranged
|
||||
//<Expects status="success"></Expects>
|
||||
|
||||
module fscArgOrder.fscArgOrder
|
||||
|
||||
let v1 : int = LibforfscArgOrder.T.Member
|
|
@ -1,8 +0,0 @@
|
|||
// #Regression #NoMT #CompilerOptions #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:4271
|
||||
// Big mistery: compiler does not produce the expected .dll when the command line argruments are rearranged
|
||||
//<Expects status="success"></Expects>
|
||||
|
||||
module fscArgOrder.fscArgOrder
|
||||
|
||||
val v1 : int
|
|
@ -1,11 +0,0 @@
|
|||
// #Conformance #BasicGrammarElements #Constants #ReqNOMT #RequiresPowerPack #NETFX20Only
|
||||
#light
|
||||
|
||||
// Verify the ability to specify basic constants - continued
|
||||
// We now need a reference to FSharp.PowerPack.dll in order for this to compile!
|
||||
|
||||
#r "FSharp.PowerPack.dll"
|
||||
|
||||
let bignumConst = 1N
|
||||
|
||||
exit 0
|
|
@ -1,7 +1,7 @@
|
|||
// #Regression #Conformance #BasicGrammarElements #Constants #NETFX20Only
|
||||
// Verify the ability to specify basic constants - continued
|
||||
// We now need a reference to FSharp.PowerPack.dll in order for this to compile!
|
||||
// #r "FSharp.PowerPack.dll"
|
||||
|
||||
|
||||
//<Expects id="FS0784" span="(7,19-7,21)" status="error">This numeric literal requires that a module 'NumericLiteralN' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope</Expects>
|
||||
|
||||
let bignumConst = 1N
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// #Regression #Conformance #BasicGrammarElements #Constants #NoMono #ReqNOMT #NETFX40Only
|
||||
|
||||
// Verify the ability to specify basic constants - continued
|
||||
// We now need a reference to FSharp.PowerPack.dll in order for this to compile!
|
||||
// #r "FSharp.PowerPack.dll"
|
||||
|
||||
|
||||
// error FS0191: This numeric literal requires that a module 'NumericLiteralN' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope
|
||||
//<Expects id="FS0784" span="(9,19-9,21)" status="error">This numeric literal requires that a module 'NumericLiteralN' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope</Expects>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
SOURCE=BasicConstants.fs # BasicConstants.fs
|
||||
NoMT,ReqPP SOURCE=BasicConstantsBigNum01.fsx # BasicConstantsBigNum01.fsx
|
||||
NOMONO,NoMT SOURCE=E_BasicConstantsBigNum40.fsx SCFLAGS="--test:ErrorRanges" # E_BasicConstantsBigNum40.fsx
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// #Conformance #DeclarationElements #Attributes #Import #RequiresPowerPack
|
||||
// #Conformance #DeclarationElements #Attributes #Import
|
||||
// Ignore "Uses of this construct may result in the generation of unverifiable .NET IL code..."
|
||||
#nowarn "9"
|
||||
|
||||
|
@ -9,12 +9,12 @@ open Microsoft.FSharp.Math
|
|||
[<StructLayout(LayoutKind.Explicit)>] // As per FSHARP1.0:5931, LayoutKind.Sequential (=default) does not allow FieldOffset
|
||||
type Align16 =
|
||||
[<FieldOffset(0)>]
|
||||
val mutable x0 : complex
|
||||
val mutable x0 : System.DateTime
|
||||
[<FieldOffset(8)>]
|
||||
val x1 : complex
|
||||
val x1 : System.DateTime
|
||||
|
||||
// Verify no runtime asserts...
|
||||
let mutable test1 = new Align16()
|
||||
test1.x0 <- new complex()
|
||||
test1.x0 <- new System.DateTime()
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
ReqPP SOURCE=FieldOffset01.fs SCFLAGS="-r:FSharp.PowerPack.dll" PEVER=/MD # FieldOffset01.fs
|
||||
SOURCE=FieldOffset01.fs SCFLAGS="" PEVER=/MD # FieldOffset01.fs
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
SOURCE=openSystem01.fs # openSystem01.fs
|
||||
ReqPP SOURCE=openFsharpCompatibility01.fs SCFLAGS="-r:FSharp.PowerPack.Compatibility.dll" # openFsharpCompatibility01.fs
|
||||
|
||||
SOURCE=OpenNestedModule01.fs # OpenNestedModule01.fs
|
||||
SOURCE=openDU.fs # openDU.fs
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// #Conformance #DeclarationElements #Import #RequiresPowerPack
|
||||
#light
|
||||
|
||||
// Open a module in FSharp.Compatibility.dll
|
||||
open Microsoft.FSharp.Compatibility
|
||||
let anInt = Int32.of_string "123121414"
|
||||
// Looks like everything worked out OK
|
||||
exit 0
|
|
@ -1,4 +1,4 @@
|
|||
// #Conformance #DeclarationElements #LetBindings #ActivePatterns #RequiresPowerPack
|
||||
// #Conformance #DeclarationElements #LetBindings #ActivePatterns
|
||||
#light
|
||||
|
||||
let (|A|B|) x = if x < 0 then A else B
|
||||
|
@ -13,18 +13,18 @@ let _ =
|
|||
| A -> exit 1
|
||||
| B -> printfn "Great!"
|
||||
|
||||
// Example from Expert F#
|
||||
open Microsoft.FSharp.Math
|
||||
let (|Rect|) (x:complex) = (x.RealPart, x.ImaginaryPart)
|
||||
|
||||
let addViaRect a b =
|
||||
|
||||
let (|DT|) (x:System.DateTime) = (x.Date, x.TimeOfDay)
|
||||
|
||||
let maxit a b =
|
||||
match a, b with
|
||||
| Rect (ar, ai), Rect (br, bi) -> Complex.mkRect(ar+br, ai+bi)
|
||||
| DT (ar, ai), DT (br, bi) -> max ar br
|
||||
|
||||
let result = addViaRect Complex.One Complex.OneI
|
||||
if result.r.CompareTo(1.0) <> result.i.CompareTo(1.0) then exit 1
|
||||
let result = maxit System.DateTime.Now System.DateTime.Now
|
||||
if result.Date <> System.DateTime.Now.Date then exit 1
|
||||
|
||||
|
||||
// Looks like active patterns are working OK
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
ReqPP SOURCE=SanityCheck.fs SCFLAGS="-r:FSharp.PowerPack.dll" # SanityCheck.fs
|
||||
SOURCE=SanityCheck.fs SCFLAGS="" # SanityCheck.fs
|
||||
SOURCE=parameterizedActivePattern.fs # parameterizedActivePattern.fs
|
||||
SOURCE=partialActivePattern.fs # partialActivePattern.fs
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Need to develop way to use reflection to scan F# codes to verify built structure.
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #DeclarationElements #LetBindings #TypeInference #RequiresPowerPack
|
||||
// Regression test for FSharp1.0:4472
|
||||
// Title: Problem with Expr_tchoose and initialization graphs
|
||||
// Compile with reference to FSharp.PowerPack
|
||||
|
||||
let rec all_integers_starting_from n = LazyList.consf n (fun _ -> all_integers_starting_from (n+1))
|
||||
and combine x1 x2 = 1
|
||||
and next_primes x = failwith ""
|
||||
and primes =
|
||||
let twos = all_integers_starting_from 3
|
||||
LazyList.consf 2 (fun _ -> next_primes twos)
|
||||
|
||||
exit 0
|
|
@ -1 +0,0 @@
|
|||
ReqPP SOURCE=TopArityInfoOfValues01.fs SCFLAGS="-r:FSharp.PowerPack.dll" # TopArityInfoOfValues01.fs
|
|
@ -1,16 +1,16 @@
|
|||
// #Regression #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties #RequiresPowerPack
|
||||
// #Regression #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties
|
||||
// Regression test for FSHARP1.0:4163
|
||||
// Setter with no arguments (curried or uncurried?)
|
||||
// Used to crash the compiler!
|
||||
//<Expects id="FS0001" span="(15,13-15,16)" status="error">This expression was expected to have type unit but here has type matrix</Expects>
|
||||
//<Expects id="FS0001" span="(15,13-15,16)" status="error">This expression was expected to have type. unit .but here has type. int</Expects>
|
||||
//See FSHARP1.0:5456
|
||||
open Microsoft.FSharp.Math
|
||||
|
||||
|
||||
type Transform (rotation : (float * float * float), position : (float * float *float)) =
|
||||
let foo = Matrix.create 4 4 1.0
|
||||
let foo = 1
|
||||
member v.init
|
||||
with set() =
|
||||
let bar = foo in
|
||||
Matrix.set bar 0 0 (0.5 * 0.5)
|
||||
()
|
||||
bar
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// #Regression #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties #RequiresPowerPack
|
||||
// #Regression #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties
|
||||
// Verify write-only properties
|
||||
// See also FSHARP1.0:4163
|
||||
let mutable globalPt : obj = null
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE=tupledValueProperties01.fs # tupledValueProperties01.fs
|
||||
ReqPP SOURCE=tupledValueProperties02.fsx SCFLAGS="--nologo" FSIMODE=PIPE COMPILE_ONLY=1 # tupledValueProperties02.fsx
|
||||
SOURCE=tupledValueProperties02.fsx SCFLAGS="--nologo" FSIMODE=PIPE COMPILE_ONLY=1 # tupledValueProperties02.fsx
|
||||
|
||||
SOURCE=genericGenericClass.fs # GenericGenericClass.fs
|
||||
SOURCE=instMembers-class.fs # InstMembers-Class.fs
|
||||
|
@ -30,7 +30,7 @@ ReqPP SOURCE=tupledValueProperties02.fsx SCFLAGS="--nologo" FSIMODE=PIPE COMPILE
|
|||
SOURCE=Properties03.fs # Properties03.fs
|
||||
SOURCE=Properties04.fs # Properties04.fs
|
||||
SOURCE=Properties05.fs # Properties05.fs
|
||||
ReqPP SOURCE=E_Properties06.fs SCFLAGS="--test:ErrorRanges -r:FSharp.PowerPack.dll --flaterrors" # E_Properties06.fs
|
||||
SOURCE=E_Properties06.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_Properties06.fs
|
||||
|
||||
SOURCE=AbstractProperties01.fs # AbstractProperties01.fs
|
||||
SOURCE=E_AbstractProperties02.fs SCFLAGS="--test:ErrorRanges --flaterrors # E_AbstractProperties02.fs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties #RequiresPowerPack
|
||||
// #Conformance #DeclarationElements #MemberDefinitions #MethodsAndProperties
|
||||
// Regression test for FSHARP1.0:966
|
||||
// Verify that we can have properties that takes tuples for arguments
|
||||
// Note: the non-curried syntax ((x:decimal, y:decimal)) is expected
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
// #Conformance #Constants #RequiresPowerPack
|
||||
// Constant expressions
|
||||
// This is the example quoted from the specs
|
||||
// Verification:
|
||||
// - all the different types work
|
||||
// - the type we get is what we meant it to be
|
||||
#light
|
||||
|
||||
let v1 = 99999999N // bignum (Microsoft.FSharp.Math.BigRational)
|
||||
|
||||
let check(x:bignum) = true
|
||||
|
||||
exit (if check(v1) then 0 else 1)
|
|
@ -1,7 +1,6 @@
|
|||
SOURCE=bigint.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" # bigint.fs
|
||||
SOURCE=bigint02.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" # bigint02.fs
|
||||
|
||||
ReqPP SOURCE=bignum.fs SCFLAGS="-r:FSharp.PowerPack.dll" # bignum.fs
|
||||
SOURCE=bool.fs # bool.fs
|
||||
SOURCE=byte.fs # byte.fs
|
||||
SOURCE=byteArr.fs # byteArr.fs
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression for FSHARP1.0:4791
|
||||
// With optimizations on this would print wrong values (see bug for conditions causing failure)
|
||||
//<Expects Status=success></Expects>
|
||||
//<<Output
|
||||
//GOT: 0
|
||||
//GOT: 5
|
||||
//GOT: 10
|
||||
//GOT: 15
|
||||
//GOT: 20
|
||||
//Output
|
||||
|
||||
#nowarn "57"
|
||||
|
||||
open System
|
||||
open System.Linq
|
||||
open Microsoft.FSharp.Linq.Query
|
||||
|
||||
let doMul (x:int) (y:int) = x*y
|
||||
|
||||
let mainNet (inps:seq<int>) =
|
||||
let mul = 5
|
||||
let rec doPass () =
|
||||
let cur = Queryable.AsQueryable<int>(inps)
|
||||
let outs =
|
||||
query <@ cur |> Seq.map (fun par -> doMul mul par) @>
|
||||
for o in outs do printfn "GOT: %A" o
|
||||
doPass()
|
||||
|
||||
mainNet (seq{for i in 0..4 -> i})
|
|
@ -1,30 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression for FSHARP1.0:4791
|
||||
// With optimizations on this would throw ArgumentException trying to convert quotation to expression tree
|
||||
//<Expects Status=success></Expects>
|
||||
//<<Output
|
||||
//GOT: 0
|
||||
//GOT: 5
|
||||
//GOT: 10
|
||||
//GOT: 15
|
||||
//GOT: 20
|
||||
//Output
|
||||
|
||||
#nowarn "57"
|
||||
|
||||
open System
|
||||
open System.Linq
|
||||
open Microsoft.FSharp.Linq.Query
|
||||
|
||||
let doMul (x:string) (y:int) = y * 5
|
||||
|
||||
let mainNet (inps:seq<int>) =
|
||||
let mul = "boom"
|
||||
let rec doPass () =
|
||||
let cur = Queryable.AsQueryable<int>(inps)
|
||||
let outs =
|
||||
query <@ cur |> Seq.map (fun par -> doMul mul par) @>
|
||||
for o in outs do printfn "GOT: %A" o
|
||||
doPass()
|
||||
|
||||
mainNet (seq{for i in 0..4 -> i})
|
|
@ -1,54 +0,0 @@
|
|||
// #Regression #Conformance #Quotations
|
||||
#light
|
||||
// Regression test for FSHARP1.0:2546
|
||||
//<Expects status=success></Expects>
|
||||
|
||||
let quote =
|
||||
<@
|
||||
let mutable x = 0
|
||||
while x < 10 do
|
||||
x <- x + 1 // we used to emit an error here - no more!
|
||||
x
|
||||
|
||||
|
||||
@>
|
||||
|
||||
let quote2 =
|
||||
<@
|
||||
let mutable x = 0
|
||||
for i = 1 to 10 do
|
||||
x <- x + 1
|
||||
x
|
||||
@>
|
||||
|
||||
let x = sprintf "%A" quote
|
||||
let y = sprintf "%A" quote2
|
||||
|
||||
let x1 = "Let (x, Value (0),
|
||||
Sequential (WhileLoop (Call (None, op_LessThan, [x, Value (10)]),
|
||||
VarSet (x, Call (None, op_Addition, [x, Value (1)]))),
|
||||
x))"
|
||||
let y1 = "Let (x, Value (0),
|
||||
Sequential (ForIntegerRangeLoop (i, Value (1), Value (10),
|
||||
VarSet (x,
|
||||
Call (None, op_Addition,
|
||||
[x, Value (1)]))), x))"
|
||||
|
||||
exit <| if (x.Replace("\r\n", "\n") = x1.Replace("\r\n", "\n")) && (y.Replace("\r\n", "\n") = y1.Replace("\r\n", "\n")) then
|
||||
0
|
||||
else
|
||||
if(x.Replace("\r\n", "\n") <> x1.Replace("\r\n", "\n")) then
|
||||
printfn "Expected:"
|
||||
printfn "========="
|
||||
printfn "%s" x1
|
||||
printfn "Actual:"
|
||||
printfn "========="
|
||||
printfn "%s" x
|
||||
if(y.Replace("\r\n", "\n") <> y1.Replace("\r\n", "\n")) then
|
||||
printfn "Expected:"
|
||||
printfn "========="
|
||||
printfn "%s" y1
|
||||
printfn "Actual:"
|
||||
printfn "========="
|
||||
printfn "%s" y
|
||||
1
|
|
@ -1,34 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3498
|
||||
// "Quotation expression compiler reveals bug in Linq"
|
||||
// This code snipped is not supposed to throw at runtime!
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let q =
|
||||
<@ (fun (x1:double) ->
|
||||
let fwd6 =
|
||||
let y3 = x1 * x1
|
||||
(y3, (fun yb4 -> yb4 * 2.0 * x1))
|
||||
let rev5 = snd fwd6
|
||||
let w0 = fst fwd6
|
||||
|
||||
let fwd14 =
|
||||
let y11 = w0 + 1.0
|
||||
(y11, (fun yb12 -> yb12 * 1.0))
|
||||
let rev13 = snd fwd14
|
||||
let y8 = fst fwd14
|
||||
(y8, (fun y8b10 ->
|
||||
let w0b2 = 0.0
|
||||
let x1b1 = 0.0
|
||||
let dxs15 = rev13 y8b10
|
||||
let w0b2 = w0b2 + dxs15
|
||||
let dxs7 = rev5 w0b2
|
||||
let x1b1 = x1b1 + dxs7
|
||||
x1b1))) @>
|
||||
|
||||
let (res,_) = (q.Eval()) 4.0
|
||||
|
||||
(if (res = 17.0) then 0 else 1) |> exit
|
|
@ -1,4 +1,4 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// #Regression #Conformance #Quotations
|
||||
// Regression for FSB 4708
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Quotations.Patterns
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for an issue reported by a customer
|
||||
// The following code used to give an ICE in CTP bits (1.9.6.2)
|
||||
//<Expects id="FS0191" status="error">The variable 'x' is bound in a quotation but is used as part of a spliced expression\. This is not permitted since it may escape its scope</Expects>
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
|
||||
let quote (v:'a) = Expr.Cast<'a>(Expr.Value(v,typeof<'a>))
|
||||
|
||||
let g x = <@ fun x -> %(f (quote x)) @>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression tests for FSHARP1.0:3424
|
||||
// Make sure that TupleGet works
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
open System
|
||||
open Microsoft.FSharp
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let e1 = <@@ (1,2) @@>
|
||||
|
||||
let test = try
|
||||
let one = Expr.TupleGet(e1, 0).EvalUntyped()
|
||||
let two = Expr.TupleGet(e1, 1).EvalUntyped()
|
||||
if ((unbox one : int) = 1) && ((unbox two : int) = 2) then true else false
|
||||
with
|
||||
| _ -> printfn "ERROR: Unexpected exception in TupleGet"
|
||||
false
|
||||
|
||||
let test2 = try
|
||||
let three = Expr.TupleGet(e1, 3)
|
||||
printfn "ERROR: TupleGet did not throw!"
|
||||
false
|
||||
with
|
||||
| _ -> true
|
||||
|
||||
(if (test && test2) then 0 else 1) |> exit
|
|
@ -1,19 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// abs
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
if Eval <@ abs(-1.0) @> <> 1.0 then exit 1
|
||||
if Eval <@ abs(-1y) @> <> 1y then exit 1
|
||||
if Eval <@ abs(-1s) @> <> 1s then exit 1
|
||||
if Eval <@ abs(-1L) @> <> 1L then exit 1
|
||||
if Eval <@ abs(-1I) @> <> 1I then exit 1
|
||||
if Eval <@ abs(-1M) @> <> 1M then exit 1
|
||||
|
||||
exit 0
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// acos
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ acos(1.0) @>) = acos(1.0) then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// asin
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ asin(1.0) @>) = asin(1.0) then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// atan
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ atan(0.0) @>) = atan(0.0) then 0 else 1) |> exit
|
|
@ -1,12 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ (atan2 0.0 1.0) @>) = (atan2 0.0 1.0) then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// ceil
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ ceil 12.34 @>) = 13.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// cos
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ cos 0.0 @>) = 1.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// cosh
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ cosh 0.0 @>) = 1.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// exp
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ exp 0.0 @>) = 1.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// floor
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ floor -1.23 @>) = (floor -1.23) then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// log
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ log 1.0 @>) = 0.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// log10
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ log10 1.0 @>) = 0.0 then 0 else 1) |> exit
|
|
@ -1,19 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// max
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
if Eval <@ max -1.0 2.0 @> <> 2.0 then exit 1
|
||||
if Eval <@ max -1y -2y @> <> -1y then exit 1
|
||||
if Eval <@ max -1s -2s @> <> -1s then exit 1
|
||||
if Eval <@ max -1L 1L @> <> 1L then exit 1
|
||||
if Eval <@ max -1I 1I @> <> 1I then exit 1
|
||||
if Eval <@ max 1M 2M @> <> 2M then exit 1
|
||||
|
||||
exit 0
|
|
@ -1,20 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// min
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
if Eval <@ min -1.0 2.0 @> <> -1.0 then exit 1
|
||||
if Eval <@ min -1y -2y @> <> -2y then exit 1
|
||||
if Eval <@ min -1s -2s @> <> -2s then exit 1
|
||||
if Eval <@ min -1L 1L @> <> -1L then exit 1
|
||||
if Eval <@ min -1I 1I @> <> -1I then exit 1
|
||||
if Eval <@ min 1M 2M @> <> 1M then exit 1
|
||||
|
||||
exit 0
|
|
@ -1,19 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// pown
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
if Eval <@ pown 2.0 3 @> <> 8.0 then exit 1
|
||||
if Eval <@ pown 2y 3 @> <> 8y then exit 1
|
||||
if Eval <@ pown 2s 3 @> <> 8s then exit 1
|
||||
if Eval <@ pown 2L 3 @> <> 8L then exit 1
|
||||
if Eval <@ pown 2I 3 @> <> 8I then exit 1
|
||||
if Eval <@ pown 2M 3 @> <> 8M then exit 1
|
||||
|
||||
exit 0
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// round
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ round 2.23 @>) = round 2.23 then 0 else 1) |> exit
|
|
@ -1,20 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// sign
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ sign -2.23 @>) = -1 then 0 else 1) |> exit
|
||||
if Eval <@ sign 2.1 @> <> 1 then exit 1
|
||||
if Eval <@ sign -2y @> <> -1 then exit 1
|
||||
if Eval <@ sign -2s @> <> -1 then exit 1
|
||||
if Eval <@ sign -2L @> <> -1 then exit 1
|
||||
if Eval <@ sign 2I @> <> 1 then exit 1
|
||||
if Eval <@ sign 2M @> <> 1 then exit 1
|
||||
|
||||
exit 0
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// sin
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ sin 0.0 @>) = 0.0 then 0 else 1) |> exit
|
|
@ -1,13 +0,0 @@
|
|||
// #Regression #Conformance #Quotations #RequiresPowerPack
|
||||
// Regression test for FSHARP1.0:3239
|
||||
// Make sure we can dynamically evaluate overloaded math functions
|
||||
// sinh
|
||||
//<Expects status=success></Expects>
|
||||
#light
|
||||
|
||||
open Microsoft.FSharp.Quotations
|
||||
open Microsoft.FSharp.Linq.QuotationEvaluation
|
||||
|
||||
let Eval (q: Expr<_>) = q.Eval()
|
||||
|
||||
(if (Eval <@ sinh 0.0 @>) = 0.0 then 0 else 1) |> exit
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче